Skip to content

tagging

tagging #6

Workflow file for this run

name: Increment Version
on:
workflow_run:
workflows: ["linting and tests"]
types:
- completed
jobs:
version_bump:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12.1
- name: Run increment_version script
run: |
python -m pip install toml
python bump_version.py
- name: Commit, Tag and push changes
run: |
VERSION=$(python -c 'import tomllib; print("v" + tomllib.load(open("./pyproject.toml","rb"))["tool"]["poetry"]["version"])')
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add pyproject.toml
git commit -m "Bump version to $VERSION"
git tag $VERSION
git push && git push --tags
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}