Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ jobs:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# Merging the release PR here, from a push-triggered job, is what makes a
# release land without a human. A pull_request-triggered workflow cannot
# do it: GitHub holds runs on bot-authored PRs as action_required, and it
# never starts CI on a PR the GITHUB_TOKEN opened, so waiting on checks
# would wait forever.
- name: Merge the release PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --label 'autorelease: pending' \
--json number,author --jq '[.[] | select(.author.is_bot)] | .[0].number // empty')

if [ -z "$PR" ]; then
echo "No pending release PR to merge."
exit 0
fi

echo "Merging release PR #$PR"
gh pr merge "$PR" --squash --repo "$GITHUB_REPOSITORY"

publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/release-auto-merge.yaml

This file was deleted.

Loading