Skip to content

Commit d64911d

Browse files
authored
Use the trusted publisher workflow (#92)
1 parent b8b26d5 commit d64911d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
repository-projects: write
16+
contents: write
17+
pages: write
1318

1419
steps:
1520
- uses: actions/checkout@v4
@@ -45,8 +50,6 @@ jobs:
4550
run: |
4651
python -m tox -e clean,build
4752
48-
- name: Publish package
49-
uses: pypa/gh-action-pypi-publish@v1.12.2
50-
with:
51-
user: __token__
52-
password: ${{ secrets.PYPI_PASSWORD }}
53+
# This uses the trusted publisher workflow so no token is required.
54+
- name: Publish to PyPI
55+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7+
branches: [master]
78

89
jobs:
910
build:

0 commit comments

Comments
 (0)