36
36
runs-on : ubuntu-latest
37
37
environment :
38
38
name : pypi
39
- # Fill in your project (e.g. repository) name
40
- # for <package-name>
39
+ # Fill in your project (e.g. repository) name for <package-name>
41
40
url : https://pypi.org/p/<package-name>
42
41
permissions :
43
42
id-token : write # IMPORTANT: mandatory for trusted publishing
@@ -64,21 +63,24 @@ jobs:
64
63
id-token : write # IMPORTANT: mandatory for sigstore
65
64
66
65
steps :
67
- - name : Sign the dists with Sigstore
68
-
69
- with :
70
- inputs : >-
71
- ./dist/*.tar.gz
72
- ./dist/*.whl
73
- - name : Upload artifact signatures to GitHub Release
74
- # Confusingly, this action also supports updating releases, not
75
- # just creating them. This is what we want here, since we've manually
76
- # created the release above.
77
- uses : softprops/action-gh-release@v1
78
- with :
79
- # `dist/` contains the built packages, and the
80
- # sigstore-produced signatures and certificates.
81
- files : dist/**
66
+ - name : Download all the dists
67
+ uses : actions/download-artifact@v3
68
+ with :
69
+ name : python-package-distributions
70
+ path : dist/
71
+ - name : Sign the dists with Sigstore
72
+
73
+ with :
74
+ inputs : >-
75
+ ./dist/*.tar.gz
76
+ ./dist/*.whl
77
+ - name : Upload artifact signatures to GitHub Release
78
+ env :
79
+ GH_TOKEN : ${{ github.token }}
80
+ # Upload to GitHub Release using the `gh` CLI.
81
+ # `dist/` contains the built packages, and the
82
+ # sigstore-produced signatures and certificates.
83
+ run : gh release upload "${{ github.ref_name }}" dist/** --repo "${{ github.repository }}"
82
84
83
85
publish-to-testpypi :
84
86
name : Publish Python 🐍 distribution 📦 to TestPyPI
0 commit comments