File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
actions/python-build-publish Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Build and Publish Python Package'
2+ description : ' Builds a Python package and uploads it to PyPI.'
3+
4+ inputs :
5+ repository :
6+ description : ' The repository to upload the package to.'
7+ required : true
8+ token :
9+ description : ' The token to authenticate with PyPI.'
10+ required : true
11+
12+ runs :
13+ using : composite
14+ steps :
15+ - name : Build and publish test package
16+ shell : bash
17+ env :
18+ TWINE_REPOSITORY : ${{ inputs.repository }}
19+ TWINE_USERNAME : __token__
20+ TWINE_PASSWORD : ${{ inputs.token }}
21+ run : |
22+ pip install setuptools wheel twine
23+ python setup.py sdist bdist_wheel
24+ twine upload dist/*
Original file line number Diff line number Diff line change 3737 git commit --message ${{ github.event.inputs.version }} setup.py
3838 git tag v${{ github.event.inputs.version }}
3939
40+ - uses : ./.github/actions/python-build-publish
41+ with :
42+ repository : testpypi
43+ token : ${{ secrets.test_pypi_token }}
44+
4045 - name : Push release commit
4146 run : git push --tags origin ${{ github.ref_name }}
4247
You can’t perform that action at this time.
0 commit comments