Publish a Python package for release v1.1.0 #11
Workflow file for this run
This file contains 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) Python package | |
run-name: Publish a Python package for release ${{ github.event.release.tag_name }} | |
on: | |
release: | |
types: released | |
permissions: | |
contents: read | |
jobs: | |
pyversion: | |
name: Discover minimum Python version | |
uses: ./.github/workflows/_discover_python_ver.yml | |
package: | |
name: Publish Python package | |
runs-on: ubuntu-latest | |
needs: pyversion | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ needs.pyversion.outputs.pyversion }} | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Create Poetry venv | |
run: | | |
poetry env use ${{ needs.pyversion.outputs.pyversion }} | |
- name: Publish to PyPI | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry publish --build --skip-existing |