Skip to content

ci(release): stop release-please auto-merge loop - #325

Closed
Endika wants to merge 1 commit into
mainfrom
fix/release-please-loop
Closed

ci(release): stop release-please auto-merge loop#325
Endika wants to merge 1 commit into
mainfrom
fix/release-please-loop

Conversation

@Endika

@Endika Endika commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Problem

Release Please was stuck in an infinite loop, re-dispatching itself every ~90s and recreating the chore(main): release 1.7.5 PR (churned #295#324+). Release 1.7.5 never landed; latest published stayed at v1.7.4.

Root causes

  1. The release job deleted the release branch and ran gh workflow run $WORKFLOW (self-redispatch) whenever the PR had not merged within its 60s wait loop.
  2. The release PR was authored by GITHUB_TOKEN, so its CI never ran (action_required) → never green → native auto-merge never fired → the delete + redispatch recreated the PR forever.

Fix

Align with the working sister-app config (Monete):

  • Author the release PR with RELEASE_PLEASE_TOKEN (PAT) so CI runs on it and can go green.
  • Replace the delete-branch / self-redispatch / explicit-deploy block with just native auto-merge (gh pr merge --rebase --auto). The PAT-authored merge is a push to main that re-triggers this workflow to cut the release and the on: push deploy.
  • Drop the now-unused actions: write permission.

Required before this works (manual, cannot be done from here)

  1. Create repo secret RELEASE_PLEASE_TOKEN (a PAT with repo + workflow scope), as in the sister apps.
  2. Re-enable the workflow: gh workflow enable "Release Please" --repo Endika/influence-sensor.
  3. Clean up the churned release-please--branches--main--... PRs/branches left by the loop.

The release job deleted the release branch and re-dispatched itself when
the PR had not merged within 60s. Because the PR was authored by
GITHUB_TOKEN its CI never ran (action_required), so it never went green,
auto-merge never fired, and the branch-delete + self-redispatch recreated
the release PR every ~90s indefinitely.

Mirror the working sister-app config: author the PR with RELEASE_PLEASE_TOKEN
so CI runs on it, then just enable native auto-merge. The PAT-authored merge
is a push to main that re-triggers this workflow to cut the release and the
on:push deploy, so the delete/redispatch and explicit deploy dispatch are
no longer needed.
@Endika Endika closed this Jul 20, 2026
@Endika
Endika deleted the fix/release-please-loop branch July 20, 2026 09:04
@Endika
Endika restored the fix/release-please-loop branch July 20, 2026 09:09
@Endika
Endika deleted the fix/release-please-loop branch July 20, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant