File tree Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -86,26 +86,29 @@ jobs:
8686 path : ./build/html
8787
8888 deploy :
89+ name : Build and Release
8990 runs-on : ubuntu-latest
9091 if : contains(github.ref, 'refs/tags/')
91- needs : maya
92+
93+ environment :
94+ name : pypi
95+ url : https://pypi.org/p/cmdx
96+ permissions :
97+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
98+
9299 steps :
93- - uses : actions/checkout@v2
94- - name : Set up Python
95- uses : actions/setup-python@v2
96- with :
97- python-version : ' 3.x'
98- - name : Install dependencies
99- run : |
100- python -m pip install --upgrade pip
101- pip install setuptools wheel twine
102- - name : Build and publish
103- env :
104- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
105- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
106- run : |
107- python setup.py sdist bdist_wheel
108- twine upload dist/*
100+ - name : Checkout repository
101+ uses : actions/checkout@v4
102+ - name : Set up Python
103+ uses : actions/setup-python@v4
104+ with :
105+ python-version : " 3.7.x"
106+ - name : Install build dependency
107+ run : python3 -m pip install --upgrade build
108+ - name : Build a binary wheel and a source tarball
109+ run : python3 -m build
110+ - name : Release to PyPi
111+ uses : pypa/gh-action-pypi-publish@release/v1
109112
110113 docs :
111114 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments