From 69dfa0fcb2120f10bfa18334717566f5582021f1 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Fri, 15 Dec 2023 09:58:01 +0000 Subject: [PATCH] add bump version and release yml --- .bumpversion.cfg | 9 +++++++++ .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .bumpversion.cfg create mode 100644 .github/workflows/release.yml diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 00000000..ddda8ec0 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,9 @@ +[bumpversion] +commit = True +tag = True +current_version = 0.0.1 +message = Bump version: {current_version} → {new_version} [skip ci] + +[bumpversion:file:setup.py] +search = version="{current_version}" +replace = version="{new_version}" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..88d8e07a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Bump version and auto-release +on: + push: + branches: + - main + +jobs: + bump-version: + uses: openclimatefix/.github/.github/workflows/bump-version.yml@v1.8.1 + secrets: + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} + + github-release: + needs: [ bump-version ] + uses: openclimatefix/.github/.github/workflows/github-release.yml@v1.8.1 + with: + version: ${{ needs.bump-version.outputs.new_ver }} + + publish-to-pypi: + needs: [ bump-version ] + uses: openclimatefix/.github/.github/workflows/publish-to-pypi.yml@v1.8.1 + with: + ref: main + secrets: + token: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file