Skip to content

Commit b18bd5d

Browse files
authored
Merge pull request #3 from wyleung/fix_publish
Fix publish strategy to leverage Trusted Publisher between GH and pypi
2 parents bc73ba6 + e3232b4 commit b18bd5d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/python-publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ permissions:
1818
jobs:
1919
deploy:
2020
runs-on: ubuntu-latest
21+
permissions:
22+
id-token: write
2123

2224
steps:
2325
- uses: actions/checkout@v4
@@ -28,11 +30,9 @@ jobs:
2830
- name: Install dependencies
2931
run: |
3032
python -m pip install --upgrade pip
31-
pip install build
32-
- name: Build package
33-
run: python -m build
34-
- name: Publish package
35-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
36-
with:
37-
user: __token__
38-
password: ${{ secrets.PYPI_API_TOKEN }}
33+
pip install setuptools wheel build
34+
- name: Build
35+
run: |
36+
python -m build
37+
- name: Publish
38+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)