Skip to content

semantic-release

semantic-release #318

Workflow file for this run

name: Update Viewer
on:
repository_dispatch:
types: [semantic-release]
env:
app: platform
jobs:
viewer-update:
runs-on: [self-hosted, common]
if: contains('refs/heads/develop', github.event.client_payload.ref)
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPOS_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Wait for npm package
id: viewer-install
timeout-minutes: 2
run: |
while ! npm install @bimdata/viewer@${{ github.event.client_payload.viewer-version }} --save-exact; do
sleep 5
done
GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ')
echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT
- 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:
runs-on: [self-hosted, common]
if: contains('
refs/heads/master
refs/heads/main'
, github.event.client_payload.ref)
steps:
- uses: actions/checkout@v4
with:
ref: release
token: ${{ secrets.REPOS_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Wait for npm package
id: viewer-install
timeout-minutes: 2
run: |
while ! npm install @bimdata/viewer@${{ github.event.client_payload.viewer-version }} --save-exact; do
sleep 5
done
GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ')
echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT
- 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