Skip to content

Commit

Permalink
ci: fix POST_RELEASE job
Browse files Browse the repository at this point in the history
Closes #1979
  • Loading branch information
barmac committed Oct 18, 2023
1 parent 7e0e8c0 commit cdfdafb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/POST_RELEASE.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: POST_RELEASE
on:
- workflow_call
- workflow_dispatch
workflow_call:
inputs:
tag:
type: string
description: 'The released tag'
required: true
workflow_dispatch:
inputs:
tag:
type: string
description: 'The released tag'
required: true

jobs:
post-release:
Expand All @@ -14,15 +24,15 @@ jobs:
runs-on: ${{ matrix.os }}
outputs:
STABLE_RELEASE: ${{ steps.is_stable.outputs.STABLE_RELEASE }}
env:
TAG: ${{ inputs.tag }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set TAG
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Wait for published
env:
PKG: 'bpmn-js@${{ env.TAG }}'
PKG: 'bpmn-js@${{ inputs.tag }}'
run: tasks/stages/await-published
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -32,7 +42,7 @@ jobs:
- name: Check for stable release
id: is_stable
run: |
if [[ ${{ env.TAG }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
if [[ ${{ inputs.tag }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
then echo "STABLE_RELEASE=true" >> $GITHUB_OUTPUT
else echo "STABLE_RELEASE=false" >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -64,8 +74,8 @@ jobs:
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: tasks/stages/update-website
update-translations:
needs: post-release
secrets: inherit
if: ${{ needs.post-release.outputs.STABLE_RELEASE == 'true' }}
uses: ./.github/workflows/UPDATE_TRANSLATIONS.yml
- name: Update translations
if: ${{ steps.is_stable.outputs.STABLE_RELEASE == 'true' }}
uses: ./.github/workflows/UPDATE_TRANSLATIONS.yml
with:
tag: ${{ inputs.tag }}
2 changes: 2 additions & 0 deletions .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ jobs:
if: ${{ needs.release-please.outputs.release_created }}
secrets: inherit
uses: ./.github/workflows/POST_RELEASE.yml
with:
tag: ${{ needs.release-please.outputs.release_created.tag_name }}
15 changes: 13 additions & 2 deletions .github/workflows/UPDATE_TRANSLATIONS.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: UPDATE_TRANSLATIONS
on:
- workflow_call
- workflow_dispatch
workflow_call:
inputs:
tag:
type: string
description: 'The released tag'
required: true
workflow_dispatch:
inputs:
tag:
type: string
description: 'The released tag'
required: true

jobs:
update-translations:
Expand All @@ -27,4 +37,5 @@ jobs:
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
REVIEWERS: 'bpmn-io/modeling-dev'
TAG: ${{ inputs.tag }}
run: tasks/stages/update-translations

0 comments on commit cdfdafb

Please sign in to comment.