Skip to content

Commit

Permalink
fix: Try creating release PRs as shaka-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Mar 22, 2022
1 parent f6d5b10 commit 916b3b1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release-please.yaml
Expand Up @@ -27,6 +27,9 @@ jobs:
extra-files: lib/player.js
# Make sure we create the PR against the correct branch.
default-branch: ${{ github.ref_name }}
# Create the PR as shaka-bot, from a fork.
token: ${{ secrets.RELEASE_PLEASE_PR_TOKEN }}
fork: true

# If we didn't create a release, we may have created or updated a PR.
- uses: actions/checkout@v2
Expand All @@ -43,11 +46,11 @@ jobs:
sed -e "s/^\\(shaka.Player.version =\\).*/\\1 '$VERSION';/" \
-i lib/player.js
git add lib/player.js
# Emulate the actions bot.
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Update the PR.
git commit --amend --no-edit
# Update the PR as shaka-bot.
git config user.name "shaka-bot"
git config user.email "13107131+shaka-bot@users.noreply.github.com"
git commit --amend --no-edit \
--author="shaka-bot <13107131+shaka-bot@users.noreply.github.com>"
git push -f
# The jobs below are all conditional on a release having been created by
Expand All @@ -61,9 +64,6 @@ jobs:
- uses: actions/checkout@v2
- name: Tag the main branch
run: |
# Emulate the actions bot.
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
VERSION=${{ needs.release.outputs.tag_name }}
git tag -m "$VERSION-main" "$VERSION-main"
git push origin "$VERSION-main"
Expand Down

0 comments on commit 916b3b1

Please sign in to comment.