Skip to content

Commit ba1dea2

Browse files
authored
Update release workflow to trusted publishing
1 parent 3087447 commit ba1dea2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ on:
44
release:
55
types: [published]
66

7-
permissions:
8-
contents: read
9-
107
jobs:
118
deploy:
129

10+
name: Upload release to PyPI
1311
runs-on: ubuntu-latest
14-
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/pygrep
15+
permissions:
16+
contents: read
17+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
18+
1519
steps:
1620
- uses: actions/checkout@v3
1721
- name: Set up Python
@@ -26,6 +30,3 @@ jobs:
2630
run: python -m build
2731
- name: Publish package
2832
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
29-
with:
30-
user: __token__
31-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)