refactor(parsers): split parsers and back to sbt build def (#401) #440
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
repository_dispatch: | |
types: [publish] | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
publish-snapi-components: | |
runs-on: self-hosted | |
container: | |
image: ghcr.io/raw-labs/raw-scala-runner:21.0.0-ol9-20230919_scala2.12.18_sbt1.9.6 | |
options: --user 1001 --cpus 6 --memory 32g -e HOME=/home/sbtuser | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.READ_PACKAGES }} | |
env: | |
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | |
steps: | |
- if: github.event_name != 'repository_dispatch' | |
name: checkout caller ref | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- if: github.event_name == 'repository_dispatch' | |
name: checkout for PR comment | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.client_payload.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: build all | |
run: ./rebuild.sh | |
- name: sbt ci-release utils | |
run: ./release.sh | |
working-directory: utils | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release client | |
run: ./release.sh | |
working-directory: client | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release snapi-parser | |
run: ./release.sh | |
working-directory: snapi-parser | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release sql-parser | |
run: ./release.sh | |
working-directory: sql-parser | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release snapi-frontend | |
run: ./release.sh | |
working-directory: snapi-frontend | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release snapi-truffle | |
run: ./release.sh | |
working-directory: snapi-truffle | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release snapi-client | |
run: ./release.sh | |
working-directory: snapi-client | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: sbt ci-release sql-client | |
run: ./release.sh | |
working-directory: sql-client | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
CI_CLEAN: clean | |
CI_RELEASE: publishSigned | |
CI_SNAPSHOT_RELEASE: publish | |
- name: evaluate produced version | |
shell: bash | |
run: | | |
echo "UTILS_VER=$(cat utils/version)" >> $GITHUB_ENV | |
echo "CLIENT_VER=$(cat client/version)" >> $GITHUB_ENV | |
echo "SNAPI_PARSER_VER=$(cat snapi-parser/version)" >> $GITHUB_ENV | |
echo "SQL_PARSER_VER=$(cat sql-parser/version)" >> $GITHUB_ENV | |
echo "SNAPI_FRONTEND_VER=$(cat snapi-frontend/version)" >> $GITHUB_ENV | |
echo "SNAPI_TRUFFLE_VER=$(cat snapi-truffle/version)" >> $GITHUB_ENV | |
echo "SNAPI_CLIENT=$(cat snapi-client/version)" >> $GITHUB_ENV | |
echo "SQL_CLIENT=$(cat sql-client/version)" >> $GITHUB_ENV | |
- if: github.event_name == 'repository_dispatch' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
token: ${{ secrets.RAW_CI_PAT }} | |
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
body: | | |
> published utils version: ${{ env.UTILS_VER }} | |
> published client version: ${{ env.CLIENT_VER }} | |
> published snapi-parser version: ${{ env.SNAPI_PARSER_VER }} | |
> published sql-parser version: ${{ env.SQL_PARSER_VER }} | |
> published snapi-frontend version: ${{ env.SNAPI_FRONTEND_VER }} | |
> published snapi-truffle version: ${{ env.SNAPI_TRUFFLE_VER }} | |
> published snapi-client version: ${{ env.SNAPI_CLIENT }} | |
> published sql-client version: ${{ env.SQL_CLIENT }} | |
reactions: rocket | |
- if: success() && github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.RAW_CI_PAT }} | |
event-type: release | |
client-payload: '{"ref": "${{ github.ref }}", "tag": "${{ github.ref_name }}"}' | |
- if: failure() && github.event_name == 'repository_dispatch' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
token: ${{ secrets.RAW_CI_PAT }} | |
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
body: | | |
> something went wrong with `publish-snapi-components` | |
> run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed :x: | |
reactions: confused |