Publish to PyPI #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: | | |
python -m build | |
- name: Upload Github release | |
uses: softprops/action-gh-release@36833a1c712e139c96b443e3af070e95d9c0f193 | |
with: | |
files: dist/* | |
body: "Release for ${{ github.ref }}" | |
- name: Test install built package | |
run: | | |
pip install dist/*.whl | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc | |
with: | |
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} |