Skip to content

Commit

Permalink
revert to tag driven push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ykumards committed Sep 19, 2024
1 parent 0f1e311 commit 1ad7d8e
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish Python Package
on:
push:
tags:
- 'v*' # Triggers on tags that start with 'v', e.g., 'v1.0.0'
- 'v*' # Triggers only on tags that start with 'v', e.g., 'v1.1.0'

jobs:
publish:
Expand All @@ -21,23 +21,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry bump2version
- name: Update version in pyproject.toml based on tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
bump2version --new-version $TAG_NAME --allow-dirty --no-tag --no-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "Bump version to $TAG_NAME"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pip install poetry
- name: Build the package
run: poetry build
Expand Down

0 comments on commit 1ad7d8e

Please sign in to comment.