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

Implement automatic version bump #6

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Automatically bump the package version

on:
push:
branches:
- main

jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: Install dependencies
run: |
pip install setuptools_scm
- name: Figure out the next tag
shell: python
id: get_next_tag
run: |
import setuptools_scm
from packaging import version
v = version.parse(setuptools_scm.get_version())
print(f"::set-output tag=v{v.major}.{v.minor + 1}.0")
- uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
tag: ${{ steps.get_next_tag.outputs.tag }}
3 changes: 3 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: PyPI deploy

on:
workflow_dispatch:
push:
tags:
- "v*.*.*"

jobs:
pypi-deploy:
Expand Down