Create PR instead of trying to push to protected branch (#842)
This commit is contained in:
@@ -84,6 +84,8 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
- name: Commit version bumps
|
- name: Commit version bumps
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -91,8 +93,11 @@ jobs:
|
|||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git add packages/*/package.json packages/*/jsr.json 2>/dev/null || true
|
git add packages/*/package.json packages/*/jsr.json 2>/dev/null || true
|
||||||
if ! git diff --cached --quiet; then
|
if ! git diff --cached --quiet; then
|
||||||
|
git checkout -b version_bump
|
||||||
git commit -m "chore(release): bump package versions (${{ github.event.inputs.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
|
else
|
||||||
echo "No changes to commit."
|
echo "No changes to commit."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user