Skip to content

Commit

Permalink
build-publish.yml: enrich github release with package
Browse files Browse the repository at this point in the history
  • Loading branch information
stynoo committed Dec 11, 2024
1 parent ebb3a10 commit 5a3c36a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution πŸ“¦ to PyPI
name: Publish Python 🐍 distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
Expand All @@ -55,6 +54,27 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }} # LEAVING THIS HERE UNTIL TRUSTED PUBLISHING IS IN PLACE

publish-to-github-release:
name: Upload the Python 🐍 distribution to GitHub Release
if: startsWith(github.ref, 'refs/tags/') # only upload to GitHub Release on tag pushes
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: dist/
GHR_REPLACE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


publish-to-testpypi:
name: Publish Python 🐍 distribution πŸ“¦ to TestPyPI
needs:
Expand Down

0 comments on commit 5a3c36a

Please sign in to comment.