Skip to content

fix(ci): run changeset release as bombshell-bot app - #123

Open
natemoo-re wants to merge 1 commit into
mainfrom
nm/ci/bombshell-bot-release
Open

fix(ci): run changeset release as bombshell-bot app#123
natemoo-re wants to merge 1 commit into
mainfrom
nm/ci/bombshell-bot-release

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Sep 1, 2026

Copy link
Copy Markdown
Member

#122 was creating using changeset's default GITHUB_TOKEN from github-actions[bot]

now our action mints a bombshell-bot app token from the org secrets BOT_APP_ID / BOT_PRIVATE_KEY, checks out with it, sets the git author to the app, and hands it to changesets

The Publish workflow passed the default `secrets.GITHUB_TOKEN` to
`changesets/action`, so the "Version Packages" PR, the version-bump
commit, and the release tag were all attributed to `github-actions[bot]`
instead of our `bombshell-bot` GitHub App like the other Bombshell repos.

Mint an installation token from the org-level `BOT_APP_ID` /
`BOT_PRIVATE_KEY` secrets via `actions/create-github-app-token`, check
out with it so the persisted git credentials push as the app, set the
git user to the app identity so the bump commit is authored by it, and
hand the token to `changesets/action` so it opens the PR as the app.

tty can't reuse `bombshell-dev/automation`'s publish workflow (that one
builds with pnpm/Node; tty builds WASM via make + Deno), so the app-token
pattern is inlined here. `push-with-git-cli: true` stays because the clay
submodule gitlink breaks the GitHub-API push path (0e10dcd), which is
also why the git-user config is needed for commit authorship.
@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tty@123

commit: b8fae96

@natemoo-re
natemoo-re requested a review from jbolda September 1, 2026 21:39
@natemoo-re
natemoo-re marked this pull request as ready for review September 1, 2026 21:39
push-with-git-cli: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.bot-token.outputs.token }}

@trueberryless trueberryless Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. Please pass the token via the github-token parameter!

If you wonder why it worked with the default token then, the reason is that changesets does a check internally if the env var and the parameter are equal and because the parameter defaults to the GITHUB_TOKEN, it passes. With this current change however, it would through.

See https://github.com/changesets/action/blob/371fd77b45f11aeffd80c5ad40f2062fd5986bde/src/index.ts#L35-L41

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.

3 participants