File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : Upload Python Package
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
release :
5
6
types : [created]
6
7
7
8
jobs :
8
9
deploy :
9
10
runs-on : ubuntu-latest
11
+ permissions :
12
+ # IMPORTANT: this permission is mandatory for trusted publishing
13
+ id-token : write
10
14
steps :
11
- - uses : actions/checkout@v2
15
+ - uses : actions/checkout@v3
12
16
- name : Set up Python
13
- uses : actions/setup-python@v2
17
+ uses : actions/setup-python@v4
14
18
with :
15
19
python-version : ' 3.x'
16
20
- name : Install dependencies
@@ -22,14 +26,10 @@ jobs:
22
26
pip install -r tests/test_requirements.txt
23
27
pip install .
24
28
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
29
30
run : |
30
31
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
35
35
Original file line number Diff line number Diff line change @@ -51,3 +51,5 @@ Is in `docs/`. To [deploy the docs](https://www.mkdocs.org/user-guide/deploying-
51
51
``` bash
52
52
mkdocs gh-deploy
53
53
```
54
+
55
+ Note: there is no automated github action for this currently.
You can’t perform that action at this time.
0 commit comments