Skip to content

Commit a9a3504

Browse files
committed
Convert publishing workflows to trusted publishers
1 parent e22f8a2 commit a9a3504

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/publish_to_pypi.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
publish:
99
runs-on: ubuntu-latest
10+
environment: publish
11+
permissions:
12+
id-token: write
1013

1114
steps:
1215
- uses: actions/checkout@v3
@@ -19,5 +22,3 @@ jobs:
1922

2023
- name: Publish to PyPI
2124
uses: pypa/gh-action-pypi-publish@release/v1
22-
with:
23-
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/publish_to_test_pypi.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
jobs:
1515
publish:
1616
runs-on: ubuntu-latest
17+
environment: publish-testpypi
18+
permissions:
19+
id-token: write
1720

1821
steps:
1922
- uses: actions/checkout@v3
@@ -36,5 +39,4 @@ jobs:
3639
- name: Publish to TestPyPI
3740
uses: pypa/gh-action-pypi-publish@release/v1
3841
with:
39-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
4042
repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)