Skip to content

Commit 079ec1c

Browse files
committed
Publish with a Trusted Publisher
1 parent 6a14458 commit 079ec1c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ jobs:
5252
run: "python -m pytest"
5353
publish:
5454
name: "📦 Publish Python distributions"
55+
if: "startsWith(github.ref, 'refs/tags')"
5556
runs-on: "ubuntu-latest"
57+
environment: "publish"
58+
permissions:
59+
id-token: write
5660
strategy:
5761
matrix:
5862
python-version:
@@ -69,8 +73,5 @@ jobs:
6973
run: "python -m pip install wheel --user"
7074
- name: "🐍 Build a binary wheel and a source tarball"
7175
run: "python setup.py sdist bdist_wheel"
72-
- name: "📦 Publish distribution to PyPI"
76+
- name: "📦 Publish package distributions to PyPI"
7377
uses: "pypa/gh-action-pypi-publish@release/v1"
74-
if: "startsWith(github.ref, 'refs/tags')"
75-
with:
76-
password: "${{ secrets.pypi_password }}"

0 commit comments

Comments
 (0)