Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de36264

Browse files
authored
Merge pull request #203 from akrherz/gh200_pypi_trusted
CI: Use pypi trusted publisher for release
2 parents 779237a + 048ca30 commit de36264

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,29 @@ on:
99

1010
jobs:
1111
deploy:
12-
12+
environment: pypi
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
id-token: write
1417

1518
steps:
1619
- uses: actions/checkout@v6
20+
1721
- name: Set up Python
1822
uses: actions/setup-python@v6
1923
with:
2024
python-version: '3.x'
25+
2126
- name: Install dependencies
2227
run: |
2328
python -m pip install --upgrade pip
24-
python -m pip install build twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: __token__
28-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
29+
python -m pip install build
30+
31+
- name: Build package
2932
run: |
3033
python -m build
31-
twine upload dist/*
34+
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+

0 commit comments

Comments
 (0)