Skip to content

ci: migrate release-please to CLI + accept LABELER_PAT fallback#116

Merged
InstaZDLL merged 1 commit into
mainfrom
ci/release-please-cli-and-labeler-pat
May 23, 2026
Merged

ci: migrate release-please to CLI + accept LABELER_PAT fallback#116
InstaZDLL merged 1 commit into
mainfrom
ci/release-please-cli-and-labeler-pat

Conversation

@InstaZDLL
Copy link
Copy Markdown
Owner

@InstaZDLL InstaZDLL commented May 23, 2026

Why

`googleapis/release-please-action@v5.0.0` is deprecated and bundles an old release-please library. Since 2026-05 it has been returning persistent 401 "Bad credentials" on multiple endpoints (commit backfill, snoozed-PR lookup). Reruns sometimes succeed but the failures recur on every push to main, so the release PR isn't being updated with the latest merges.

`actions/labeler` + `actions/github-script` (in `label-pr.yml`) hit the same class of 401 on label POSTs — less often, but the documented workaround is the same: bypass the auto-generated `GITHUB_TOKEN` with a PAT.

What

`release-please.yml`

  • Drop `googleapis/release-please-action@v5.0.0`.
  • Add `actions/setup-node@v5` + `npx release-please@17` for both phases (`release-pr` and `github-release`) on every push.
  • Same release PR branch (`release-please--branches--main--components--waveflow`) → companion `release-please-lockfile-build.yml` keeps working untouched.

`label-pr.yml`

  • Add a job-level `env: LABEL_TOKEN: ${{ secrets.LABELER_PAT || secrets.GITHUB_TOKEN }}` ternary.
  • Pass `LABEL_TOKEN` to `actions/labeler` via `repo-token` and to both `github-script` steps via `github-token`.
  • Empty secrets are falsy so unset → fallback transparently. No-op if you don't add the PAT.

Required action from the maintainer

Create a fine-grained PAT scoped to this repo, with these permissions:

  • Repository access: only `InstaZDLL/WaveFlow`
  • Repository permissions:
    • `Metadata` — Read (auto)
    • `Issues` — Read and write (for `addLabels` / `removeLabel`)
    • `Pull requests` — Read and write (for the labeler action)
  • Expiration: ≤ 90 days (rotate when prompted)

Then add it to the repo as a secret named `LABELER_PAT`:
`Settings → Secrets and variables → Actions → New repository secret`

Without this secret the workflow falls back to `GITHUB_TOKEN` — exactly today's behaviour, so nothing breaks if you postpone it.

Test plan

  • CI on this PR runs the new `label-pr.yml` shape (with `GITHUB_TOKEN` fallback since `LABELER_PAT` isn't set yet on this branch's run)
  • After merge, push to main triggers the new `release-please.yml` CLI flow
  • Existing release PR chore(main): release 1.3.0 #111 gets updated in place with the recent merges (`fix/playlist-cover-modal-freeze`, `fix/artist-grid-violet-halo`, `fix/onboarding-1080p-and-profile-step`)
  • Once `LABELER_PAT` is added, the next PR's label workflow uses it (verified by the absence of any future 401 on `addLabels`)

`googleapis/release-please-action@v5.0.0` is deprecated and bundles
an old release-please library that's been returning persistent
401 "Bad credentials" on multiple endpoints (commit backfill,
snoozed-PR lookup) since 2026-05. Reruns helped intermittently
but the failures keep recurring on every push to main.

Drop the action and call the official `release-please` CLI v17
directly with `npx` instead. The CLI uses the same `GITHUB_TOKEN`
cleanly. Both phases run unconditionally on every push:

  - `release-pr` keeps the release PR up-to-date (idempotent)
  - `github-release` publishes the tag + release IF the head
    commit is the release-PR merge (no-op otherwise)

The release PR branch name stays the same
(`release-please--branches--main--components--waveflow`), so the
companion `release-please-lockfile-build.yml` keeps gating
correctly on `startsWith(head_ref, 'release-please--')` and
`user.login == 'github-actions[bot]'`.

label-pr.yml: accept an optional `LABELER_PAT` secret as the auth
token, falling back to the auto-generated `GITHUB_TOKEN` when not
set. Same 401 class of failures hit the `addLabels` and
`removeLabel` REST calls in this workflow; the documented escape
hatch is a fine-grained PAT scoped to issues + pull_requests
write on this repo. Empty secrets are falsy in the ternary so
unset → fallback works without extra plumbing.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (5)
  • chore: bump
  • chore(main): release
  • release-please
  • dependabot
  • [bot]

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0cfe9a14-963a-4e2a-9696-0809ae1df780

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-please-cli-and-labeler-pat

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added scope: ci CI/CD, workflows type: ci CI/CD changes size: m 50-200 lines labels May 23, 2026
@InstaZDLL InstaZDLL self-assigned this May 23, 2026
@InstaZDLL InstaZDLL merged commit cbf3805 into main May 23, 2026
13 checks passed
@InstaZDLL InstaZDLL deleted the ci/release-please-cli-and-labeler-pat branch May 23, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: ci CI/CD, workflows size: m 50-200 lines type: ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant