@@ -40,23 +40,29 @@ jobs:
40
40
# for <package-name>
41
41
url : https://pypi.org/p/<package-name>
42
42
permissions :
43
- id-token : write
43
+ id-token : write # IMPORTANT: mandatory for trusted publishing
44
44
45
45
steps :
46
- - name : Download all the dists
47
- uses : actions/download-artifact@v3
48
- with :
49
- name : python-package-distributions
50
- path : dist/
51
- - name : Publish distribution 📦 to PyPI
52
- uses : pypa/gh-action-pypi-publish@release/v1
46
+ - name : Download all the dists
47
+ uses : actions/download-artifact@v3
48
+ with :
49
+ name : python-package-distributions
50
+ path : dist/
51
+ - name : Publish distribution 📦 to PyPI
52
+ uses : pypa/gh-action-pypi-publish@release/v1
53
53
54
54
github-release :
55
55
name : >-
56
56
Sign the Python 🐍 distribution 📦 with Sigstore
57
57
and upload them to GitHub Release
58
58
needs :
59
59
- publish-to-pypi
60
+ runs-on : ubuntu-latest
61
+
62
+ permissions :
63
+ contents : write # IMPORTANT: mandatory for making GitHub Releases
64
+ id-token : write # IMPORTANT: mandatory for sigstore
65
+
60
66
steps :
61
67
- name : Sign the dists with Sigstore
62
68
@@ -70,20 +76,22 @@ jobs:
70
76
# created the release above.
71
77
uses : softprops/action-gh-release@v1
72
78
with :
73
- # dist/ contains the built packages, which smoketest-artifacts/
74
- # contains the signatures and certificates.
79
+ # ` dist/` contains the built packages, and the
80
+ # sigstore-produced signatures and certificates.
75
81
files : dist/**
76
82
77
83
publish-to-testpypi :
78
84
name : Publish Python 🐍 distribution 📦 to TestPyPI
79
85
needs :
80
86
- build
81
87
runs-on : ubuntu-latest
88
+
82
89
environment :
83
90
name : testpypi
84
91
url : https://test.pypi.org/p/<package-name>
92
+
85
93
permissions :
86
- id-token : write
94
+ id-token : write # IMPORTANT: mandatory for trusted publishing
87
95
88
96
steps :
89
97
- name : Download all the dists
0 commit comments