Skip to content

Commit

Permalink
feat: include PyPI release URL in GitHub release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Mar 13, 2024
1 parent 3c38a29 commit bbbdfe8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,25 @@ jobs:
with:
print_hash: true

- name: Parse version and output PyPI URL
id: version
# run littlepay first, so `littlepay -v` doesn't create the config file (which outputs a message)
run: |
littlepay
pip install pyproject.toml
output=$(littlepay -v)
version=${output/littlepay /}
echo "PYPI_RELEASE_URL=https://pypi.org/project/calitp-littlepay/$version" >> "$GITHUB_OUTPUT"
- name: Release
uses: softprops/action-gh-release@v1
env:
PYPI_RELEASE_URL: ${{ steps.version.outputs.PYPI_RELEASE_URL }}
with:
files: |
./dist/*.tar.gz
./dist/*.whl
prerelease: ${{ contains(github.ref, '-rc') }}
generate_release_notes: ${{ !contains(github.ref, '-rc') }}
append_body: true
body: $PYPI_RELEASE_URL

0 comments on commit bbbdfe8

Please sign in to comment.