Skip to content

Commit 18b5ac8

Browse files
committed
fix2
1 parent a0e463e commit 18b5ac8

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/pypi.yml

+21-15
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,26 @@ on:
88
- pypi-debug
99

1010
jobs:
11-
deploy:
11+
pypi-publish:
12+
name: upload release to PyPI
1213
runs-on: ubuntu-latest
14+
environment: pypi
15+
permissions:
16+
id-token: write
1317
steps:
14-
- uses: actions/checkout@v4
15-
- name: Set up Python
16-
uses: actions/setup-python@v5
17-
with:
18-
python-version: '3.9'
19-
- name: Install dependencies
20-
run: pip install --upgrade pip twine build
21-
- name: Build and publish
22-
env:
23-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
24-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
25-
run: |
26-
python -m build
27-
twine upload dist/*
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.9'
24+
25+
- name: Install build tool
26+
run: python -m pip install --upgrade build
27+
28+
- name: Build package
29+
run: python -m build
30+
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+

0 commit comments

Comments
 (0)