Skip to content

Commit

Permalink
feat: update auto create PR after bump
Browse files Browse the repository at this point in the history
  • Loading branch information
khoilen committed Jan 7, 2025
1 parent 91a570d commit 4df16a8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4df16a8

Please sign in to comment.