From 7f5ccdc2fb43c558668a76b4240c6d78d9311cf0 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Tue, 11 Jun 2024 19:55:47 +1000 Subject: [PATCH 1/2] HOTFIX store version in step output and read back to publish release --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ea482aae0..03277fa722 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,7 @@ jobs: --draft \ --title ${VERSION} \ --target ${{ github.sha }} + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" release: name: 'Release' @@ -67,7 +68,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -x - VERSION=v$(cat package/version) + VERSION=${{ steps.draft-release.outputs.version }} gh release edit ${VERSION} \ --repo runtimeverification/haskell-backend \ --draft=false From 63183f98c7a29cc14ae3edc2153665d14b235273 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Tue, 11 Jun 2024 20:11:14 +1000 Subject: [PATCH 2/2] use job outputs as described in https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs#example-defining-outputs-for-a-job --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03277fa722..3e49d45cb5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,10 +13,13 @@ jobs: draft-release: name: 'Draft Release' runs-on: ubuntu-latest + outputs: + version: ${{ steps make-release.outputs.version }} steps: - name: 'Check out code' uses: actions/checkout@v4 - name: 'Make release' + id: 'make-release' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -66,9 +69,9 @@ jobs: - name: 'Finalise release' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ needs.draft-release.outputs.version }} run: | set -x - VERSION=${{ steps.draft-release.outputs.version }} gh release edit ${VERSION} \ --repo runtimeverification/haskell-backend \ --draft=false