File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 11name : Upload Python Package
22
33on :
4+ workflow_dispatch :
45 release :
56 types : [created]
67
78jobs :
89 deploy :
910 runs-on : ubuntu-latest
11+ environment : release
12+ permissions :
13+ # IMPORTANT: this permission is mandatory for trusted publishing
14+ id-token : write
1015 steps :
1116 - uses : actions/checkout@v4
1217 with :
1924 run : |
2025 python -m pip install --upgrade pip
2126 pip install setuptools wheel twine
27+
2228 - name : Make sure unit tests succeed
2329 run : |
2430 git config --global user.name "Github Action"
@@ -27,15 +33,17 @@ jobs:
2733 pip install mkdocs-material
2834 pip install .
2935 pytest
30- - name : Build and publish
31- env :
32- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
33- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
36+
37+
38+ - name : Build
3439 run : |
3540 python setup.py sdist bdist_wheel
36- twine upload dist/*
41+
42+ # See https://docs.pypi.org/trusted-publishers/using-a-publisher/
43+ - name : Publish package distributions to PyPI
44+ uses : pypa/gh-action-pypi-publish@release/v1
3745
3846 - name : Deploy mkdocs site
3947 run : |
4048 pip install mkdocs-git-authors-plugin
41- mkdocs gh-deploy --force
49+ mkdocs gh-deploy --force
You can’t perform that action at this time.
0 commit comments