From b96f3ebdfcd7c98346c1ecc2843ac0d37a5b9c01 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Mon, 11 Nov 2024 12:55:43 +0100 Subject: [PATCH 1/2] build: :wrench: add commitizen version auto-update config file --- .cz.toml | 8 ++++++++ .github/sync.yml | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 .cz.toml diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 0000000..97c4526 --- /dev/null +++ b/.cz.toml @@ -0,0 +1,8 @@ +[tool.commitizen] +bump_message = "build(version): update version from $current_version to $new_version [skip ci]" +# Don't implement yet. +update_changelog_on_bump = false +version_provider = "poetry" +version_files = [ + "pyproject.toml" +] diff --git a/.github/sync.yml b/.github/sync.yml index 18fbad9..0e1ff07 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -15,6 +15,8 @@ group: dest: justfile - source: poetry.toml dest: poetry.toml + - source: .cz.toml + dest: .cz.toml - source: ruff.toml dest: ruff.toml - source: LICENSE.md From 5a43579c719a9496bd8e96830a99c017bc364025 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Mon, 11 Nov 2024 13:12:39 +0100 Subject: [PATCH 2/2] ci: :construction_worker: add workflow to update version --- .github/workflows/update-version.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/update-version.yml diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml new file mode 100644 index 0000000..f1f4767 --- /dev/null +++ b/.github/workflows/update-version.yml @@ -0,0 +1,15 @@ +name: Update version + +on: + pull_request: + types: + - closed + branches: + - main + +jobs: + update-version: + if: github.event.pull_request.merged == true + uses: seedcase-project/.github/.github/workflows/reusable-update-python-project-version.yml@main + secrets: + update-version-gh-token: ${{ secrets.UPDATE_VERSION_TOKEN }}