From 28f7bc6a4ceaceadf4d0d7fb23ab7e1ef474b06f Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Wed, 6 Nov 2024 17:21:41 -0700 Subject: [PATCH] ci: Updated the release workflow to use commitizen to bump the version, generate the changelog, and push those changes to the repo [skip ci] --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22fdb24..0fa6889 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,45 @@ permissions: on: workflow_dispatch: + inputs: + bump_type: + description: "Specify the type of version bump" + required: true + default: "patch" + type: choice + options: + - patch + - minor + - major jobs: + bump: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" # Specify your required Python version + + - name: Install Commitizen + run: | + python -m pip install --upgrade pip + pip install commitizen + + - name: Bump version with Commitizen + run: | + cz bump --yes --increment ${{ github.event.inputs.bump_type }} + + - name: Push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git push origin main --follow-tags + release-plz: # see https://release-plz.ieni.dev/docs/github # for more information