|
1 | 1 | # This workflows will upload a Python Package using Twine when a release is created |
2 | 2 | # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries |
| 3 | +# To create a release: |
| 4 | +# - make sure readalongs/_version.py has the new version number |
| 5 | +# - create an annotated tag, e.g., run: git tag -a v1.2.3 -m"v1.2.3" |
| 6 | +# - push the tag, which will trigger this workflow to publish on PyPI and GitHub |
3 | 7 |
|
4 | 8 | name: Upload Python Package |
5 | 9 | on: |
@@ -47,34 +51,30 @@ jobs: |
47 | 51 | run: python -m build --sdist --wheel |
48 | 52 |
|
49 | 53 | - name: Sign the dists with Sigstore |
50 | | - uses: sigstore/gh-action-sigstore-python@v3.0.0 |
| 54 | + uses: sigstore/gh-action-sigstore-python@a5caf349bc536fbef3668a10ed7f5cd309a4b53d # v3.2.0 |
51 | 55 | with: |
52 | 56 | inputs: >- |
53 | 57 | ./dist/*.tar.gz |
54 | 58 | ./dist/*.whl |
55 | 59 |
|
56 | 60 | - name: Update CHANGELOG |
57 | 61 | id: changelog |
58 | | - uses: requarks/changelog-action@v1 |
| 62 | + uses: requarks/changelog-action@b78a3354a01f4a1affb484b9264b506a815c46b1 # v1.10.3 |
59 | 63 | with: |
60 | 64 | token: ${{ github.token }} |
61 | 65 | tag: ${{ github.ref_name }} |
62 | 66 |
|
63 | 67 | - name: Create a GitHub release |
64 | | - uses: ncipollo/release-action@v1 |
| 68 | + uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # @v1.21.0 |
65 | 69 | with: |
66 | 70 | tag: ${{ github.ref_name }} |
67 | 71 | name: ${{ github.ref_name }} |
68 | 72 | body: ${{ steps.changelog.outputs.changes }} |
69 | 73 | token: ${{ github.token }} |
70 | 74 |
|
71 | | - - name: Remove the sigstore files, not supported by pypa publish |
72 | | - run: rm -f ./dist/*.sigstore.json |
73 | | - |
74 | 75 | - name: Publish distribution 📦 to PyPI |
75 | 76 | uses: pypa/gh-action-pypi-publish@release/v1 |
76 | 77 | with: |
77 | | - password: ${{ secrets.PYPI_API_TOKEN }} |
78 | 78 | verbose: true |
79 | 79 | attestations: true |
80 | 80 |
|
|
0 commit comments