From a7148f3802bdc4cbcddebe09eeaff7b7072d6098 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Fri, 8 Mar 2024 21:04:19 +0100 Subject: [PATCH 1/2] Automatically bump versions --- .github/workflows/bump.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..e69de29 From a6621f8bbf37ebb58122ac1dc8429a61113b8997 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Fri, 8 Mar 2024 21:23:08 +0100 Subject: [PATCH 2/2] Automatically bump the version --- .github/workflows/bump.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/pypi.yml | 3 +++ 2 files changed, 35 insertions(+) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index e69de29..a407f2b 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -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 }} diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d3011f3..16f7e97 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -2,6 +2,9 @@ name: PyPI deploy on: workflow_dispatch: + push: + tags: + - "v*.*.*" jobs: pypi-deploy: