Browse Source

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

pull/849/head
Henri Bergius 9 months ago
committed by GitHub
parent
commit
96c5d0d86f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      .github/workflows/release-packages.yml

7
.github/workflows/release-packages.yml

@ -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

Loading…
Cancel
Save