Files
python-sagemcom-api-master/.github/workflows/release.yml
T
dependabot[bot] 8ace9825c7 Bump Gr1N/setup-poetry from 7 to 8
Bumps [Gr1N/setup-poetry](https://github.com/gr1n/setup-poetry) from 7 to 8.
- [Release notes](https://github.com/gr1n/setup-poetry/releases)
- [Commits](https://github.com/gr1n/setup-poetry/compare/v7...v8)

---
updated-dependencies:
- dependency-name: Gr1N/setup-poetry
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-06-27 07:24:54 +00:00

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@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
- 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: "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