Skip to content

Commit f2917d5

Browse files
authored
HOTFIX store version in step output and read back to publish release (#3930)
Follows the example from https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs#example-defining-outputs-for-a-job to store the version number in a job output.
1 parent 52ff279 commit f2917d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ jobs:
1313
draft-release:
1414
name: 'Draft Release'
1515
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps make-release.outputs.version }}
1618
steps:
1719
- name: 'Check out code'
1820
uses: actions/checkout@v4
1921
- name: 'Make release'
22+
id: 'make-release'
2023
env:
2124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2225
run: |
@@ -27,6 +30,7 @@ jobs:
2730
--draft \
2831
--title ${VERSION} \
2932
--target ${{ github.sha }}
33+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
3034
3135
release:
3236
name: 'Release'
@@ -65,9 +69,9 @@ jobs:
6569
- name: 'Finalise release'
6670
env:
6771
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
VERSION: ${{ needs.draft-release.outputs.version }}
6873
run: |
6974
set -x
70-
VERSION=v$(cat package/version)
7175
gh release edit ${VERSION} \
7276
--repo runtimeverification/haskell-backend \
7377
--draft=false

0 commit comments

Comments
 (0)