File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish release to PyPI
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ # ##############################################################################
8+ # ⬇️ Default permissions for the whole workflow: pull code + request OIDC
9+ # ##############################################################################
10+ permissions :
11+ contents : read # required by gh release download
12+ id-token : write # 🔑 enables token-less “Trusted Publisher” uploads
13+
14+ jobs :
15+ publish-to-pypi :
16+ if : ${{ github.event.release.prerelease == false }} # skip prereleases
17+ runs-on : ubuntu-latest
18+ environment : pypi
19+
20+ steps :
21+ - name : Download release assets
22+ env :
23+ GH_TOKEN : ${{ github.token }} # granted automatically
24+ run : gh release download "${{ github.event.release.tag_name }}" --dir dist
25+
26+ - name : Publish to PyPI
27+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments