semantic-release #447
This file contains hidden or 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: Update Viewer | |
| on: | |
| repository_dispatch: | |
| types: [semantic-release] | |
| env: | |
| app: platform | |
| permissions: {} | |
| jobs: | |
| viewer-update: | |
| permissions: | |
| contents: write # Required for committing changes | |
| runs-on: [self-hosted, common] | |
| if: contains('refs/heads/develop', github.event.client_payload.ref) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.REPOS_TOKEN }} | |
| # Needed for EndBug/add-and-commit | |
| persist-credentials: true | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Wait for npm package | |
| id: viewer-install | |
| timeout-minutes: 2 | |
| run: | | |
| while ! npm install @bimdata/viewer@${VIEWER_VERSION} --save-exact; do | |
| sleep 5 | |
| done | |
| GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ') | |
| echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT | |
| env: | |
| VIEWER_VERSION: ${{ github.event.client_payload.viewer-version }} | |
| - name: Commit diff | |
| if: steps.viewer-install.outputs.gitdiff | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: "package-lock.json package.json" | |
| message: "chore: bump @bimdata/viewer@${{ github.event.client_payload.viewer-version }} from Github Actions [skip e2e]" | |
| viewer-stable-update: | |
| permissions: | |
| contents: write # Required for committing changes | |
| runs-on: [self-hosted, common] | |
| if: contains(' | |
| refs/heads/master | |
| refs/heads/main' | |
| , github.event.client_payload.ref) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: release | |
| persist-credentials: true | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Wait for npm package | |
| id: viewer-install | |
| timeout-minutes: 2 | |
| run: | | |
| while ! npm install @bimdata/viewer@${VIEWER_VERSION} --save-exact; do | |
| sleep 5 | |
| done | |
| GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ') | |
| echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT | |
| env: | |
| VIEWER_VERSION: ${{ github.event.client_payload.viewer-version }} | |
| - name: Commit diff | |
| if: steps.viewer-install.outputs.gitdiff | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: "package-lock.json package.json" | |
| message: "chore: bump @bimdata/viewer@${{ github.event.client_payload.viewer-version }} from Github Actions [skip e2e]" | |
| push: origin release |