Skip to content

ci: use release app token for changesets - #20

Merged
mvantellingen merged 1 commit into
mainfrom
ci/release-app-token
Oct 26, 2026
Merged

mvantellingen merged 1 commit into
mainfrom
ci/release-app-token

Conversation

@mvantellingen

Copy link
Copy Markdown
Member

Problem

changesets/action opens the "Release new version" PR and pushes the changeset-release/main branch with the default GITHUB_TOKEN. GitHub does not trigger workflows for events created by GITHUB_TOKEN, so runs on that PR sit at action_required (e.g. labd/js-toolkit#12, labd/intl-extractor#26) and the required org Security Checks never complete, which blocks the merge.

Fix

  • Add a step that mints an installation token for the org GitHub App lab-digital-release-bot (actions/create-github-app-token, SHA-pinned v3.3.0) using vars.RELEASE_APP_ID / secrets.RELEASE_APP_PRIVATE_KEY, scoped to contents: write and pull-requests: write.
  • Pass it to changesets/action via github-token. The action uses that token for the API calls, for the release branch / tag pushes (with push-with-git-cli it injects it as a command-scoped http.extraHeader, so checkout credentials are not needed), and exports it as GITHUB_TOKEN to the version/publish scripts.
  • Remove the GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} env on the changesets step where present: v2 errors out when that env differs from github-token.

npm trusted publishing (OIDC), environment: release, checkout settings and caching are unchanged.

@mvantellingen
mvantellingen merged commit ad576f9 into main Oct 26, 2026
6 checks passed
@mvantellingen
mvantellingen deleted the ci/release-app-token branch October 26, 2026 17:05
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