Skip to content

Commit

Permalink
Merge pull request #6 from ssciwr/version-bump
Browse files Browse the repository at this point in the history
Implement automatic version bump
  • Loading branch information
dokempf authored Mar 8, 2024
2 parents 2e30d26 + a6621f8 commit 98703e0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
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

0 comments on commit 98703e0

Please sign in to comment.