Skip to content

Commit 0b44625

Browse files
committed
update github action
1 parent 5bd035d commit 0b44625

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
name: Upload Python Package
22

33
on:
4+
workflow_dispatch:
45
release:
56
types: [created]
67

78
jobs:
89
deploy:
910
runs-on: ubuntu-latest
11+
permissions:
12+
# IMPORTANT: this permission is mandatory for trusted publishing
13+
id-token: write
1014
steps:
11-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1216
- name: Set up Python
13-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v4
1418
with:
1519
python-version: '3.x'
1620
- name: Install dependencies
@@ -22,14 +26,10 @@ jobs:
2226
pip install -r tests/test_requirements.txt
2327
pip install .
2428
pytest
25-
- name: Build package & publish to PyPi
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
- name: Build package
2930
run: |
3031
python setup.py sdist bdist_wheel
31-
twine upload dist/*
32-
- name: Deploy mkdocs site
33-
run: |
34-
mkdocs gh-deploy --force
32+
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
33+
- name: Publish package distributions to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
3535

docs/contributing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ Is in `docs/`. To [deploy the docs](https://www.mkdocs.org/user-guide/deploying-
5151
```bash
5252
mkdocs gh-deploy
5353
```
54+
55+
Note: there is no automated github action for this currently.

0 commit comments

Comments
 (0)