Skip to content

Commit 1ca81e8

Browse files
author
Alan Christie
committed
ci: Use of trusted publishing
1 parent cd1fc51 commit 1ca81e8

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/publish.yaml

+3-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ name: publish
77
# Control variables (GitHub Secrets)
88
# -----------------
99
#
10-
# At the GitHub 'organisation' or 'project' level you must have the following
11-
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
12-
#
13-
# PYPI_USERNAME
14-
# PYPI_TOKEN
10+
# None
1511
#
1612
# -----------
1713
# Environment (GitHub Environments)
@@ -27,6 +23,8 @@ on:
2723
jobs:
2824
build-and-publish:
2925
runs-on: ubuntu-latest
26+
permissions:
27+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
3028
steps:
3129
- name: Checkout
3230
uses: actions/checkout@v4
@@ -45,6 +43,3 @@ jobs:
4543
python -m build --sdist --wheel --outdir dist/
4644
- name: Publish
4745
uses: pypa/gh-action-pypi-publish@release/v1
48-
with:
49-
user: ${{ secrets.PYPI_USERNAME }}
50-
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)