From 7c88901185d7e98e71659caa1771b51f17051104 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Mon, 25 Nov 2024 17:42:16 -0700 Subject: [PATCH] ci: Update the bump step of the release workflow [skip ci] --- .github/workflows/release.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aea6514..4109669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,16 +49,32 @@ jobs: run: | cz bump --yes --increment ${{ github.event.inputs.bump_type }} - - name: Push changes + - name: Push changes to a new branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git push origin main --follow-tags --force + VERSION=$(cz version) + BRANCH_NAME="release-$VERSION" + git checkout -b $BRANCH_NAME + git add . + git commit -m "chore: bump version to $VERSION" + git push origin $BRANCH_NAME + + - name: Create pull request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ steps.push-changes.outputs.BRANCH_NAME }} + title: "Release ${{ steps.push-changes.outputs.VERSION }}" + body: "This pull request contains the changes for the ${{ steps.push-changes.outputs.VERSION }} release." + base: main release-plz: # see https://release-plz.ieni.dev/docs/github # for more information - name: Release-plz + needs: bump + name: Release Crate + if: always() runs-on: ubuntu-latest steps: - name: Check if actor is repository owner