Skip to content

Commit daa802b

Browse files
committed
Update pythonpublish.yml
1 parent 73a486b commit daa802b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
permissions:
11+
# IMPORTANT: this permission is mandatory for trusted publishing
12+
id-token: write
1013
steps:
11-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1215
- name: Set up Python
13-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v4
1417
with:
1518
python-version: '3.x'
1619
- name: Install dependencies
@@ -22,13 +25,9 @@ jobs:
2225
pip install -r tests/test_requirements.txt
2326
pip install .
2427
pytest
25-
- name: Build package & publish to PyPi
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
28+
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1
3231
- name: Deploy mkdocs site
3332
run: |
3433
pip install mkdocs-git-revision-date-localized-plugin

0 commit comments

Comments
 (0)