Create PR instead of trying to push to protected branch (#842)

This commit is contained in:
Henri Bergius
2025-09-13 15:56:01 -04:00
committed by GitHub
parent 2d98f57b65
commit 96c5d0d86f
+6 -1
View File
@@ -84,6 +84,8 @@ jobs:
- name: Commit version bumps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
set -euo pipefail
@@ -91,8 +93,11 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add packages/*/package.json packages/*/jsr.json 2>/dev/null || true
if ! git diff --cached --quiet; then
git checkout -b version_bump
git commit -m "chore(release): bump package versions (${{ github.event.inputs.bump }})"
git push
git push -u origin version_bump
gh pr create --title "Bump package versions" --body "Bump versions of NPM and JSR packages" --base main --head version_bump
echo "Pushed to branch version_bump"
else
echo "No changes to commit."
fi