Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
irusland committed Oct 8, 2024
1 parent e5fe680 commit 071184d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish to PyPI
on:
push:
tags:
- "v*"
- "v*" # Trigger the workflow on tag pushes (e.g., v1.0.0)

jobs:
publish:
Expand All @@ -21,6 +21,14 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Update version in pyproject.toml
run: |
poetry version ${{ env.VERSION }}
- name: Install dependencies
run: poetry install

Expand All @@ -30,4 +38,4 @@ jobs:
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build
run: poetry publish --build

0 comments on commit 071184d

Please sign in to comment.