Skip to content

Commit 00abef0

Browse files
authored
Merge pull request #388 from dalito/pypi-safe-publishing
Change to secure publishing for PyPI
2 parents e24f65f + f78774a commit 00abef0

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/pypi-publish.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
name: Build and publish Python 🐍 package 📦 to PyPI
4141
needs: build
4242
runs-on: ubuntu-latest
43-
# Next 5 lines prepare for trusted publishing: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
44-
# environment:
45-
# name: pypi-release
46-
# url: https://pypi.org/p/linkml-runtime
47-
# permissions:
48-
# id-token: write # this permission is mandatory for trusted publishing
43+
# Uses trusted publishing. https://docs.pypi.org/trusted-publishers/adding-a-publisher/
44+
environment:
45+
name: pypi-release
46+
url: https://pypi.org/p/linkml-runtime
47+
permissions:
48+
id-token: write # This permission is mandatory for trusted publishing.
4949
steps:
5050
- name: Download built distribution
5151
uses: actions/[email protected]
@@ -55,7 +55,6 @@ jobs:
5555

5656
- name: Publish package 📦 to PyPI
5757
if: github.event_name == 'release'
58-
uses: pypa/[email protected]
58+
uses: pypa/[email protected].4
5959
with:
60-
password: ${{ secrets.pypi_password }}
61-
# verbose: true
60+
verbose: true

0 commit comments

Comments
 (0)