Skip to content

Commit 520ad80

Browse files
authored
chore: Fix release workflow (#2295)
Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
1 parent 986a819 commit 520ad80

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/flow-release-explorer.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,28 @@ jobs:
4848
@commitlint/cli@19.5.0 @commitlint/config-conventional@19.5.0 \
4949
marked-mangle@1.1.10 marked-gfm-heading-id@4.1.1 semantic-release-conventional-commits@3.0.0
5050
51+
- name: Setup JQ
52+
uses: dcarbone/install-jq-action@b7ef57d46ece78760b4019dbc4080a1ba2a40b45 # v3.2.0
53+
with:
54+
version: 1.7
55+
5156
- name: Calculate Next Version
5257
working-directory: _frontend
5358
env:
5459
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
55-
run: npx semantic-release --dry-run
60+
run: |
61+
if [[ "${{ github.event.repository.default_branch }}" == "${{ github.ref_name }}" ]]; then
62+
semantic-release --dry-run
63+
else
64+
if [[ "${{ inputs.dry-run-enabled }}" == "true" ]]; then
65+
jq -r '.version' './package.json' > VERSION
66+
else
67+
gh run cancel ${{ github.run_id }}
68+
fi
69+
fi
5670
5771
- name: Retrieve Version
72+
working-directory: _frontend
5873
id: release
5974
run: echo "version=$(cat VERSION)" >> "${GITHUB_OUTPUT}"
6075

0 commit comments

Comments
 (0)