Skip to content

Commit 889bba8

Browse files
committed
ci: publish pre-release.yml via trusted publishing instead of an API token
1 parent c182458 commit 889bba8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/pre-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
pypi-publish:
2222
name: Build dist & upload to PyPI
2323
runs-on: ubuntu-latest
24+
permissions:
25+
id-token: write # mint the OIDC token PyPI trusted publishing verifies
26+
contents: read # actions/checkout
2427
if: ${{ github.actor == 'github-actions[bot]' || github.actor == 'ryanhill1' }}
2528
steps:
2629
- uses: actions/checkout@v4
@@ -54,6 +57,4 @@ jobs:
5457
- name: Publish package to PyPI
5558
uses: pypa/gh-action-pypi-publish@release/v1
5659
with:
57-
user: __token__
58-
password: ${{ secrets.PYPI_API_TOKEN }}
5960
packages-dir: ${{ steps.build-dev.outputs.dir }}

0 commit comments

Comments
 (0)