From 56a27b7389eb02e6e81c14685ab7b9b2be4e4403 Mon Sep 17 00:00:00 2001 From: Katy Baulch <46493669+katybaulch@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:51:39 +0100 Subject: [PATCH] Output release upload URL in Git workflow --- .github/workflows/git.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml index 3ffd9c7..ecd03f1 100644 --- a/.github/workflows/git.yml +++ b/.github/workflows/git.yml @@ -7,6 +7,10 @@ on: description: The next determined tag based on the last PR body value: ${{ jobs.determine-next.outputs.new_tag }} + upload_url: + description: The URL of the created release + value: ${{ jobs.release.outputs.upload_url }} + jobs: determine-next: runs-on: ubuntu-latest @@ -48,6 +52,8 @@ jobs: release: if: ${{ github.ref == 'refs/heads/main' && needs.determine-next.outputs.new_tag != 'Skip' }} runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create-release.outputs.upload_url }} permissions: contents: write needs: @@ -57,6 +63,7 @@ jobs: - uses: actions/checkout@v4 - name: Create Git release + id: create-release uses: ncipollo/release-action@v1.14.0 with: token: "${{ secrets.GITHUB_TOKEN }}" @@ -64,3 +71,5 @@ jobs: makeLatest: true prerelease: false tag: ${{ needs.determine-next.outputs.new_tag }} + + - run: echo "upload_url=${{ steps.create-release.outputs.upload_url }}" >> "$GITHUB_OUTPUT"