Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: publish github tag reflecting pypi release #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/publish_on_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- completed

permissions:
contents: read
contents: write

jobs:
deploy:
Expand All @@ -20,11 +20,30 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Version bump
uses: monperrus/pyproject-bump-pypi@main
id: bump_version
with:
file_to_bump: "./pyproject.toml"
bump_type: "minor"
- name: Commit version bump
run: |
git add pyproject.toml
git commit -m "Bump version to ${{ steps.bump_version.outputs.new_version }}"
git push
- name: Get new version
id: get_version
run: |
VERSION=$(grep -m1 'version = ' pyproject.toml | cut -d '"' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create and push tag
run: |
git tag v${{ steps.get_version.outputs.version }}
git push origin v${{ steps.get_version.outputs.version }}
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
Expand Down