Bumps [Gr1N/setup-poetry](https://github.com/gr1n/setup-poetry) from 8 to 9. - [Release notes](https://github.com/gr1n/setup-poetry/releases) - [Commits](https://github.com/gr1n/setup-poetry/compare/v8...v9) --- updated-dependencies: - dependency-name: Gr1N/setup-poetry dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
# 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@v9
|
|
with:
|
|
message: "Bump version to ${{ github.event.release.tag_name }}"
|
|
add: "pyproject.toml"
|
|
ref: "master"
|
|
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
|