Skip to content

ci: run release-please with an app token so release PRs get CI - #16

Merged
amondnet merged 1 commit into
mainfrom
ci/release-pr-app-token
Jul 28, 2026
Merged

amondnet merged 1 commit into
mainfrom
ci/release-pr-app-token

Conversation

@amondnet

@amondnet amondnet commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every CI run on a release-please PR has been parked at action_required and never executed — including the one that shipped v0.1.0.

$ gh run list --branch release-please--branches--main --workflow ci.yml
CI [pull_request] completed/action_required c44ee37   <- the current 0.1.1 release PR (#15)
CI [pull_request] completed/action_required 11b8e8b
CI [pull_request] completed/action_required 77eedc2
CI [pull_request] completed/action_required cefb345   <- shipped as v0.1.0

Cause. The org requires workflow approval for first-time contributors, and github-actions[bot] never becomes one:

$ gh api repos/pleaseai/openhwp/actions/permissions/fork-pr-contributor-approval
{"approval_policy":"first_time_contributors"}

release-please ran on the default GITHUB_TOKEN, so it authored its PRs as that bot and their workflow runs stayed pending approval. Dependabot is unaffected (#3/#4/#5 all show CI completed/success) because it has its own trusted lane.

Why this is worse than it sounds. The failure is quiet. GitHub Apps — CodeQL, SonarCloud, Socket — are not subject to the gate and report normally, so a release PR presents a wall of green checks while check and smoke never ran. v0.1.0 merged in exactly that state.

Fix

Switch release-please to a pleaseai-release-bot app token, matching pleaseai/shunt and pleaseai/code-intelligence. Shunt's workflow comment states the same rationale, so this brings openhwp in line rather than inventing a pattern.

No admin action is required — everything already exists:

Prerequisite Status
pleaseai-release-bot app (id 2162598) installed org-wide, repository_selection: all
vars.RELEASE_GITHUB_APP_CLIENT_ID org variable, resolves for this repo
secrets.RELEASE_GITHUB_APP_PRIVATE_KEY org secret, resolves for this repo

Job-level GITHUB_TOKEN permissions are dropped, since every write now goes through the app token (least privilege, and what shunt does).

This also fixes a second latent problem: a tag pushed with GITHUB_TOKEN does not trigger downstream workflows, so any future release/publish workflow keyed on the tag would silently never fire.

Verification

  • actions/create-github-app-token@bcd2ba4 verified against upstream — gh api repos/actions/create-github-app-token/git/ref/tags/v3.2.0 returns exactly that SHA, so the pin is genuinely v3.2.0 and not a copied value.
  • Both actions are pinned to full 40-char SHAs per the OSS policy.
  • Workflow YAML parses; deno task check, deno lint, deno fmt --check pass.
  • Note the proof is necessarily post-merge: this workflow only runs on push to main.

Follow-up on the open release PR

#15 was authored by github-actions[bot] before this change, so its CI is still gated. Once this merges, release-please re-runs as the app and updates that branch, which should let CI run. If it doesn't, closing #15 and letting release-please recreate it clears the stale author.

Separately, I verified #15 by hand in the meantime (deno task check / lint / fmt --check against c44ee37, all pass) — which also confirms the #10 fix works: it bumps apps/desktop/deno.json 0.1.0 → 0.1.1 and leaves the root deno.json untouched.

Related issue

Closes #11

Checklist

  • PR title follows Conventional Commits
  • Tests added or updated — n/a, CI configuration (the repo has no deno test suite yet)
  • Lint/format pass (deno lint / deno fmt --check)
  • Documentation updated if behavior changed — rationale documented in the workflow header
  • No breaking change

Summary by cubic

Run release-please with the pleaseai-release-bot app token so release PRs get CI. Fixes stuck action_required runs from github-actions[bot] and lets tag pushes trigger downstream workflows.

  • Bug Fixes
    • Use actions/create-github-app-token to mint an app token from vars.RELEASE_GITHUB_APP_CLIENT_ID and secrets.RELEASE_GITHUB_APP_PRIVATE_KEY.
    • Pass the token to googleapis/release-please-action; remove job-level GITHUB_TOKEN write permissions.
    • Matches the pattern used in pleaseai/shunt and pleaseai/code-intelligence.

Written for commit 62c2354. Summary will update on new commits.

Every CI run on a release-please PR was parked at `action_required` and
never executed. The four runs on release-please--branches--main are all
`completed/action_required`, including the v0.1.0 release that shipped.

Cause: this repository requires workflow approval for first-time
contributors (`approval_policy: first_time_contributors`, set org-wide),
and github-actions[bot] never becomes a contributor. release-please ran on
the default GITHUB_TOKEN, so it authored its PRs as that bot and their
workflow runs stayed pending approval.

The failure mode is quiet, which is the dangerous part. GitHub Apps —
CodeQL, SonarCloud, Socket — are not subject to the gate and report
normally, so a release PR presents a wall of green checks while `check`
and `smoke` have not run at all. v0.1.0 merged that way; it was verified
by hand instead.

Switch to a pleaseai-release-bot app token, matching pleaseai/shunt and
pleaseai/code-intelligence. The app is installed org-wide, and both inputs
already resolve for this repo: RELEASE_GITHUB_APP_CLIENT_ID is an org
variable, RELEASE_GITHUB_APP_PRIVATE_KEY an org secret. Drop the job-level
GITHUB_TOKEN permissions — every write now goes through the app token.

This also fixes a second latent problem: a tag pushed with GITHUB_TOKEN
does not trigger downstream workflows, so any future release/publish
workflow keyed on the tag would silently never fire.

Closes #11
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sonarqubecloud

Copy link
Copy Markdown

@amondnet
amondnet marked this pull request as ready for review July 28, 2026 08:30
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates release automation to use a short-lived GitHub App token.

  • Mints the token from organization-level client ID and private-key configuration.
  • Passes the token to release-please so release PRs and tags can trigger downstream workflows.
  • Removes the now-unnecessary write permissions from the default GITHUB_TOKEN.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The token action inputs and output wiring are consistent, the workflow remains limited to pushes on main, and the default GitHub token no longer retains unnecessary write permissions.

Important Files Changed

Filename Overview
.github/workflows/release-please.yml Correctly replaces the default workflow token with a SHA-pinned GitHub App token and passes it to the SHA-pinned release-please action.

Reviews (1): Last reviewed commit: "ci: run release-please with an app token..." | Re-trigger Greptile

@amondnet
amondnet merged commit f189493 into main Jul 28, 2026
12 checks passed
@amondnet
amondnet deleted the ci/release-pr-app-token branch July 28, 2026 08:49
amondnet added a commit that referenced this pull request Jul 28, 2026
…s and Homebrew

openhwp shipped v0.1.0 with no downloadable artifact. `deno desktop` was only
ever run locally, so there was nothing for users to install and nothing a
Homebrew cask could point at.

Add a Release workflow, triggered by the GitHub Release that release-please
publishes. That event only fires because release-please now runs with an app
token (#16); under GITHUB_TOKEN it would not have.

macOS signing is handled by `deno desktop` itself. With
desktop.macos.codesignIdentity set it signs the bundle — including the CEF
framework and the five helper apps — and applies Hardened Runtime and a secure
timestamp. Verified against a local build: helper identifiers are derived
correctly (dev.pleaseai.openhwp.helper, .helper.gpu), so no hand-rolled
inside-out codesign pass is needed. Only notarization is manual, via notarytool
with an App Store Connect API key, followed by stapling.

The identity is injected in CI rather than committed: with codesignIdentity in
deno.json, any contributor without the certificate would fail to build.

Two details the build depends on. deno desktop has no universal-binary flag, so
arm64 and x86_64 are built on separate runners and the cask carries both. And
CFBundleName is derived from the --output filename, so builds land in a
per-arch directory and are renamed afterwards — `-o OpenHWP-darwin-arm64.dmg`
would otherwise name the application that.

Signing degrades honestly: with no certificate configured the build emits a
warning and produces an ad-hoc bundle, and the verify step fails if a
certificate was supplied but the result is still ad-hoc.

The cask is the tap's first (it holds CLI formulae today), so the job creates
Casks/. packaging/homebrew/openhwp.rb is the reviewable copy of the generated
template, mirroring the convention in pleaseai/shunt.

JSR publishing is present but gated off. @openhwp does not exist on jsr.io yet,
and the package would not be runnable regardless: it is the shell entrypoint,
and the studio bundle it needs is gitignored and absent from the package. The
job is documented as namespace reservation and stays disabled until the scope
is created and JSR_PUBLISH_ENABLED is set.
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.

ci: release-please PRs never run CI (action_required), so releases merge unverified

1 participant