v1.13.11 #106
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
# This workflow will upload a Python Package using Poetry when a release is published | |
name: Publish Python Package (PyPi) | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v9 | |
- name: Bump Poetry version | |
run: | | |
tag=${{ github.event.release.tag_name }} | |
version_number=${tag#?} | |
poetry version $version_number | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v4 | |
with: | |
message: "Bump version to ${{ github.event.release.tag_name }}" | |
add: "pyproject.toml" | |
ref: "main" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and publish to PyPi | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
poetry build | |
poetry publish |