From 4df16a840bfb375ba7851c7c7e49e45183a9a0f9 Mon Sep 17 00:00:00 2001 From: khoilen Date: Tue, 7 Jan 2025 12:00:18 +0700 Subject: [PATCH] feat: update auto create PR after bump --- .github/workflows/bump-version.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 43d6b93..a106637 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -51,12 +51,22 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | if [ "${{ env.new_version }}" != "unknown" ]; then + git checkout -b bump-version-${{ env.new_version }} git add . - git commit -m "Bump version to ${{ env.VERSION }}" + git commit -m "Bump version to ${{ env.new_version }}" git tag "v${{ env.new_version }}" - git push origin "v${{ env.new_version }}" - git push origin main --follow-tags + git push origin bump-version-${{ env.new_version }} --follow-tags else echo "Skipping push due to unknown version" fi working-directory: apps/nt-stylesheet + + - name: Create Pull Request + if: env.new_version != 'unknown' + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: bump-version-${{ env.new_version }} + title: "Bump version to ${{ env.new_version }}" + body: "This PR bumps the version to ${{ env.new_version }}." + labels: version-bump