Skip to content

Commit

Permalink
Output release upload URL in Git workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Sep 9, 2024
1 parent a4b964e commit 56a27b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -57,10 +63,13 @@ jobs:
- uses: actions/checkout@v4

- name: Create Git release
id: create-release
uses: ncipollo/[email protected]
with:
token: "${{ secrets.GITHUB_TOKEN }}"
generateReleaseNotes: true
makeLatest: true
prerelease: false
tag: ${{ needs.determine-next.outputs.new_tag }}

- run: echo "upload_url=${{ steps.create-release.outputs.upload_url }}" >> "$GITHUB_OUTPUT"

0 comments on commit 56a27b7

Please sign in to comment.