Skip to content

Commit 9156f3c

Browse files
committed
Fix trusted publishing
1 parent bc8d2f3 commit 9156f3c

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/release-dev.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ jobs:
77
release:
88
name: Release
99
runs-on: ubuntu-latest
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/p/human-readable
13+
permissions:
14+
id-token: write
1015
steps:
1116
- name: Check out the repository
1217
uses: actions/checkout@v6
@@ -34,5 +39,4 @@ jobs:
3439
- name: Publish package on TestPyPI
3540
uses: pypa/gh-action-pypi-publish@release/v1
3641
with:
37-
password: ${{ secrets.TEST_PYPI_TOKEN }}
3842
repository-url: https://test.pypi.org/legacy/

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
release:
1010
name: Release
1111
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/human-readable
15+
permissions:
16+
id-token: write
1217
steps:
1318
- name: Check out the repository
1419
uses: actions/checkout@v6
@@ -38,9 +43,6 @@ jobs:
3843
3944
- name: Publish package on PyPI
4045
uses: pypa/gh-action-pypi-publish@release/v1
41-
with:
42-
user: __token__
43-
password: ${{ secrets.PYPI_TOKEN }}
4446

4547
- name: Publish the release notes
4648
uses: release-drafter/release-drafter@v7

0 commit comments

Comments
 (0)