Skip to content

Commit

Permalink
fixup! not running inside container for now
Browse files Browse the repository at this point in the history
  • Loading branch information
datYori committed Mar 26, 2024
1 parent d3ed9e6 commit 086666d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,43 +108,42 @@ jobs:
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@v2
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: |
> will publish utils version: ${{ env.UTILS_VER }}
> will publish client version: ${{ env.CLIENT_VER }}
> will publish snapi-frontend version: ${{ env.SNAPI_FRONTEND_VER }}
> will publish snapi-truffle version: ${{ env.SNAPI_TRUFFLE_VER }}
> will publish snapi-client version: ${{ env.SNAPI_CLIENT }}
> will publish sql-client version: ${{ env.SQL_CLIENT }}
> published utils version: ${{ env.UTILS_VER }}
> published client version: ${{ env.CLIENT_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@v2
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: success() && github.event_name == 'repository_dispatch'
uses: peter-evans/create-or-update-comment@v2
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
> run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) success :heavy_check_mark:
> run [${{ github.run_id }}/$GITHUB_JOB](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) success :heavy_check_mark:
reactions: hooray
- if: failure() && github.event_name == 'repository_dispatch'
uses: peter-evans/create-or-update-comment@v2
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: |
> run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed :x:
> run [${{ github.run_id }}/$GITHUB_JOB](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed :x:
reactions: confused

publish-snapi-parser:
Expand Down Expand Up @@ -191,46 +190,48 @@ jobs:
"key": "gpg.keyname",
"value": "${{ secrets.GPG_KEYNAME }}"
}]
- name: publish
- if: github.event_name == 'repository_dispatch'
name: publish to snapshots repo
working-directory: snapi-parser
run: |
./publish.sh
echo SNAPI_PARSER_VER="$(cat version)" >> $GITHUB_ENV
- if: github.event_name != 'repository_dispatch'
name: release
working-directory: snapi-parser
run: ./release.sh
run: |
./release.sh
echo SNAPI_PARSER_VER="$(cat version)" >> $GITHUB_ENV
- if: github.event_name == 'repository_dispatch'
uses: peter-evans/create-or-update-comment@v2
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: |
> will publish snapi-parser version: ${{ env.SNAPI_PARSER_VER }}
> published snapi-parser version: ${{ env.SNAPI_PARSER_VER }}
reactions: rocket
- if: success() && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: peter-evans/repository-dispatch@v2
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: success() && github.event_name == 'repository_dispatch'
uses: peter-evans/create-or-update-comment@v2
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
> run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) success :heavy_check_mark:
> run [${{ github.run_id }}/$GITHUB_JOB](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) success :heavy_check_mark:
reactions: hooray
- if: failure() && github.event_name == 'repository_dispatch'
uses: peter-evans/create-or-update-comment@v2
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: |
> run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed :x:
> run [${{ github.run_id }}/$GITHUB_JOB](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed :x:
reactions: confused
2 changes: 1 addition & 1 deletion snapi-parser/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
SCRIPT_HOME="$(cd "$(dirname "$0")"; pwd)"
[ "$CI" == "true" ] && { export MAVEN_CLI_OPTS="-B";}
[ "$CI" == "true" ] && { export HOME=/home/sbtuser; export MAVEN_CLI_OPTS="-B";}
. ~/.sdkman/bin/sdkman-init.sh

yes n | sdk install java 21-graalce || true
Expand Down
2 changes: 1 addition & 1 deletion snapi-parser/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ sdk use java 21-graalce
cd "$SCRIPT_HOME"

VERSION=$(git describe --tags | sed 's/^v//;s/-\([0-9]*\)-g/+\1-/')
mvn clean deploy -Pdev,deploy -Drevision=$VERSION -Dchangelist=
mvn clean deploy -Pdev,deploy -Drevision=$VERSION
echo "${VERSION}" > version
1 change: 1 addition & 0 deletions snapi-parser/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ cd "$SCRIPT_HOME"

VERSION=$(git describe --tags | sed 's/^v//;s/-\([0-9]*\)-g/+\1-/')
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED"
mvn clean deploy -Pdev,deploy -Drevision=$VERSION -Dchangelist=
mvn nexus-staging:release -Pdev,deploy -Drevision=$VERSION -Dchangelist=
echo "${VERSION}" > version

0 comments on commit 086666d

Please sign in to comment.