diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index ba9c5be..0a94231 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -1,13 +1,13 @@ -# Written following the guide: +# Modified from the original version of: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ -name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI +name: Publish 📦 to PyPI and TestPyPI on: push jobs: build: - name: Build distribution 📦 + name: Build distribution runs-on: ubuntu-latest steps: @@ -32,7 +32,7 @@ jobs: publish-to-pypi: name: >- - Publish Python 🐍 distribution 📦 to PyPI + Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build @@ -44,17 +44,17 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - - name: Download all the dists + - name: Download the dists uses: actions/download-artifact@v3 with: name: python-package-distributions path: dist/ - - name: Publish distribution 📦 to PyPI + - name: Upload to PyPI uses: pypa/gh-action-pypi-publish@release/v1 github-release: name: >- - Sign the Python 🐍 distribution 📦 with Sigstore + Sign the distribution with Sigstore and upload them to GitHub Release needs: - publish-to-pypi @@ -96,7 +96,7 @@ jobs: --repo '${{ github.repository }}' publish-to-testpypi: - name: Publish Python 🐍 distribution 📦 to TestPyPI + name: Publish distribution to TestPyPI # unlike for PyPI, releases on any push on TestPyPI needs: - build runs-on: ubuntu-latest @@ -109,12 +109,12 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - - name: Download all the dists + - name: Download the dists uses: actions/download-artifact@v3 with: name: python-package-distributions path: dist/ - - name: Publish distribution 📦 to TestPyPI + - name: Upload to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/