Repository navigation
ci(release): Move to Craft auto versioning - #567
Merged
Merged
Conversation
Switch the Release workflow from action-prepare-release to getsentry/craft@v3 with the full bump set (auto, pre, patch, minor, major; default auto), an optional exact version override, and force, matching getsentry/junior. Craft reads the reachable vX.Y.Z-src tags as prereleases, so auto and bump types would promote 0.52.0-src to 0.52.0. Map the source tags back to vX.Y.Z in the job checkout before Craft runs. Set minVersion 3.9.0 so Craft allows auto, bump types, and pre. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
BYK
requested changes
Nov 6, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A pre release publishes a GitHub Release, and update-major-tag.yml moved v0 to it, so @v0 users would run the prerelease. Move the bundle commit and tag updates into bin/publish-action-bundle.sh and skip the major tag when the version has a prerelease suffix.
Craft could not read warden's releases because each vX.Y.Z tag pointed at a detached commit holding dist/action, so main only reached vX.Y.Z-src. Commit the ncc bundle to main instead and check its freshness in CI, so Craft's github target tags a release commit that main reaches. - Track dist/action bundle files, mark them linguist-generated - CI fails when a rebuilt bundle differs from the committed one - Remove the tag remap, -src tags and the detached bundle commit - update-major-tag.yml only moves vX, and skips prereleases Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
Built with pnpm build:action from the current sources (unchanged from main 95d26a7). The files are byte-identical to the v0.52.0 bundle, and Node 22 and Node 24 builds match. Split in parts to fit the push size limit. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
| model: model.id, | ||
| messages, | ||
| stream: true, | ||
| prompt_cache_key: (model.baseUrl.includes("api.openai.com") && cacheRetention !== "none") || |
| const isTogether = provider === "together" || baseUrl.includes("api.together.ai") || baseUrl.includes("api.together.xyz"); | ||
| const isMoonshot = provider === "moonshotai" || provider === "moonshotai-cn" || baseUrl.includes("api.moonshot."); | ||
| const isOpenRouter = provider === "openrouter" || baseUrl.includes("openrouter.ai"); | ||
| const isCloudflareWorkersAI = provider === "cloudflare-workers-ai" || baseUrl.includes("api.cloudflare.com"); |
| const isMoonshot = provider === "moonshotai" || provider === "moonshotai-cn" || baseUrl.includes("api.moonshot."); | ||
| const isOpenRouter = provider === "openrouter" || baseUrl.includes("openrouter.ai"); | ||
| const isCloudflareWorkersAI = provider === "cloudflare-workers-ai" || baseUrl.includes("api.cloudflare.com"); | ||
| const isCloudflareAiGateway = provider === "cloudflare-ai-gateway" || baseUrl.includes("gateway.ai.cloudflare.com"); |
| const isOpenRouter = provider === "openrouter" || baseUrl.includes("openrouter.ai"); | ||
| const isCloudflareWorkersAI = provider === "cloudflare-workers-ai" || baseUrl.includes("api.cloudflare.com"); | ||
| const isCloudflareAiGateway = provider === "cloudflare-ai-gateway" || baseUrl.includes("gateway.ai.cloudflare.com"); | ||
| const isNvidia = provider === "nvidia" || baseUrl.includes("integrate.api.nvidia.com"); |
| const isCloudflareWorkersAI = provider === "cloudflare-workers-ai" || baseUrl.includes("api.cloudflare.com"); | ||
| const isCloudflareAiGateway = provider === "cloudflare-ai-gateway" || baseUrl.includes("gateway.ai.cloudflare.com"); | ||
| const isNvidia = provider === "nvidia" || baseUrl.includes("integrate.api.nvidia.com"); | ||
| const isAntLing = provider === "ant-ling" || baseUrl.includes("api.ant-ling.com"); |
| const isNvidia = provider === "nvidia" || baseUrl.includes("integrate.api.nvidia.com"); | ||
| const isAntLing = provider === "ant-ling" || baseUrl.includes("api.ant-ling.com"); | ||
| const isCerebras = provider === "cerebras" || baseUrl.includes("cerebras.ai"); | ||
| const isDeepSeek = provider === "deepseek" || baseUrl.toLowerCase().includes("deepseek.com"); |
git describe --tags prefers the annotated v0 over the lightweight vX.Y.Z on the same commit, so Craft would read v0 as the previous release. Put v0 on a same-tree child commit that main does not reach.
BYK
requested changes
Nov 6, 2026
sentry-junior Bot
added a commit
to getsentry/vitest-evals
that referenced
this pull request
Nov 6, 2026
Pointing v0 at the release commit lets git describe return v0 once main reaches that commit, and Craft then cannot parse the latest version. Point v0 at a child commit with the release tree instead, the same fix as getsentry/warden#567.
On same-repo PRs, rebuild dist/action and push it to the PR branch with a release bot app token, so CI runs again on the new commit. The token is created after the build. Fork PRs can't be pushed to, so the existing freshness check stays as the gate there and on main and release branches. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Build the bundle in a job with no secrets and pass it on as an artifact. A second job creates the app token, commits the artifact and pushes it, with no install, no build and git hooks off for both commit and push.
BYK
added a commit
to getsentry/craft
that referenced
this pull request
Nov 6, 2026
…kup (#969) Fixes two `floatingTags` bugs that keep repos with `v`-prefixed release tags from using it. **Prereleases moved floating tags.** `updateFloatingTags` had no prerelease check, so a `pre` release like `0.54.0-alpha.0` moved `v0` to the alpha for everyone pinned to `@v0`. It now skips (and logs) when the version has a semver prerelease identifier. **Floating tags hid the previous release.** `git describe --tags --match 'v*'` also matches `v0`. When `v0` and `v0.53.0` are on the same commit, git picks `v0`, Craft can't parse a version from it, and `auto` computes from `0.0.0` (a vitest-evals dry run gave `0.0.0 -> 0.1.0`). `findLatestTag` now skips tags with no version after the prefix (`v0`, `v0.53`, `latest`) by excluding them and describing again, the same loop it already used to skip prereleases. `getLatestTag` goes through it too, so `prepare`, auto/pre versioning, the changelog base, and `craft changelog` all get the fix. Prefixed monorepo tags and prerelease handling are unchanged. Tests cover a prerelease leaving floating tags alone, a stable release still moving them, and a real git repo where `v0` and `latest` sit on the `v0.53.0` commit, which now resolves to `v0.53.0` for every lookup. The GitHub target docs mention both behaviors. This unblocks getsentry/warden#567 and getsentry/vitest-evals#117 replacing their `update-major-tag.sh` scripts with `floatingTags: ["v{major}"]`. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A5177a1a88a2e80b15a376402e26b19da --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A5177a1a88a2e80b15a376402e26b19da) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A5177a1a88a2e80b15a376402e26b19da/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
Craft 3.11.1 moves floating tags on stable releases only and skips them
when it looks up the previous release. Set floatingTags: ['v{major}'] on
the github target, require Craft 3.11.1, and remove update-major-tag.yml
and bin/update-major-tag.sh.
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 62844ca. Configure here.
Craft bumps from the latest version tag, prereleases included. On main that is v0.52.0-src, so pre would publish 0.52.0-src.0 and major 1.0.0. Without a version input, fail when that tag is not the package version, and correct the transition notes in the release spec. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
The commit job ran on pull_request, so a writer could edit the workflow and read SENTRY_RELEASE_BOT_PRIVATE_KEY. The pull_request build now only uploads a stale bundle. commit-action-dist.yml runs on workflow_run from the default branch, takes the PR identity from the payload, copies only regular files from the artifact, runs no PR code, and mints the token last before a fast-forward push. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
The committed ncc bundle in dist/action/ raised CodeQL alerts on generated code. Scan the same languages as default setup (actions, javascript-typescript, python) with a config that ignores dist/. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
A late action-dist run for an older commit cancelled the push for the newer commit. The remaining push then failed the fast-forward check, so the rebuilt bundle never landed.
BYK
approved these changes
Nov 7, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

BYK asked to move the Craft repos to the latest Craft release workflow, with
autoand the full bump set. This makes warden's Release workflow matchgetsentry/junior, and lets Craft read warden's release tags with no workarounds.What changed
release.ymlnow usesgetsentry/craft@v3(floatingv3tag) instead ofgetsentry/action-prepare-release, withversion: ${{ inputs.version || inputs.bump }}.bump(auto,pre,patch,minor,major; defaultauto), an optional exactversion, andforce. Craft now resolves the version.permissions(contents: read,copilot-requests: write) andllm_api_key: ${{ github.token }}, the same as junior. This does nothing until.craft.ymlsetschangelog.aiSummary..craft.ymlgetsminVersion: 3.11.1. Older Craft rejects bump types andauto(2.14.0),pre(3.9.0), and moves floating tags on prereleases (fixed in 3.11.1).dist/action/(the ncc bundle files only) is tracked and markedlinguist-generatedin.gitattributes. The CIbuildjob rebuilds it andbin/check-action-dist.shfails when the result differs from the committed files, including new or removed chunks. Fork and Dependabot PRs can't get the auto-commit, so contributors there runpnpm build:actionand commitdist/action/(CONTRIBUTING.md,AGENTS.md).action-dist.ymlruns onpull_requestwith no secrets. Itsbuildjob runs the PR install and build. On a same-repo, non-Dependabot PR with a stale bundle, it uploadsdist/actionas an artifact.commit-action-dist.ymlruns onworkflow_runwhenaction-dist.ymlcompletes. It takes the PR's identity (head SHA, head branch, head repository) from theworkflow_runpayload, not from the artifact. It skips unless the event ispull_request, the head repo is this repo, the actor is not Dependabot, and the branch is notmainorrelease/*. It downloads the artifact from that run id and treats it as untrusted data: it fails if the artifact holds anything other than regular files and directories (such as symlinks or FIFOs), then copies it intodist/action/. It runs no code from the PR.bin/commit-action-dist.shandbin/push-action-dist.shcome from the default-branch checkout, and the PR checkout haspersist-credentials: falseand hooks off (core.hooksPath=/dev/null). It creates the release bot app token as the last step, so CI runs again on the new commit, and pushes on top of the head SHA. If the branch moved, the push is not a fast-forward and fails.pull_requestworkflow uses the release bot key now.workflow_runruns only from the default branch, so the first real run happens after merge.v0.update-major-tag.ymlandbin/update-major-tag.share removed. Craft's github target tags the release commit, which main reaches after Craft merges the release branch back. On stable releases it also movesv0there (floatingTags: ['v{major}']). Since Craft 3.11.1 (getsentry/craft#969), a prerelease never movesv0, and the previous-release lookup skips tags without a fullmajor.minor.patch, sov0on the release commit does not hidev0.53.0. The release commit has the committeddist/action/, so@v0and@vX.Y.Zrun the same bundle..github/workflows/codeql.ymlscansactions,javascript-typescriptandpython(the same languages as default setup) onpull_request, push to main and a weekly schedule..github/codeql/codeql-config.ymlignoresdist/**, so the committed bundle gives no alerts. A repo admin must turn off default setup under Settings → Code security. Until then, GitHub rejects the advanced uploads and the CodeQL jobs fail. CodeQL is not a required check.bin/craft-release-tags.sh(and its release.yml step) andbin/publish-action-bundle.sh.specs/release-process.mddescribes the new flow.Why the old flow existed
dist/was gitignored, so the bundle could only live on a commit off main. After each release, a workflow built it, committed it on top of the release tag, and force-movedvX.Y.Zandv0there. It leftvX.Y.Z-srcon the source commit. main reached only those-srctags, which Craft reads as prereleases, so this PR first needed a tag remap script. Committing the bundle to main (theactions/typescript-actionpattern) removes the need for all of it.First release after merge
main still reaches only the old
v0.52.0-srcandv0.46.0tags. Existing tags are not changed.version, for example0.53.0. Craft bumps from the latest tag, prereleases included, which isv0.52.0-srcon main.auto,patchandminorwould give0.52.0,pre0.52.0-src.0, andmajor1.0.0. A newCheck release baselinestep (bin/check-release-baseline.sh) runs whenversionis empty. It fails when the latest version tag is notvplus thepackages/warden/package.jsonversion, so these runs stop before Craft.v0.46.0, the latest stable tag main reaches, so it repeats the 0.47.0 to 0.52.0 entries. Trim them on therelease/0.53.0branch before you approve the publish request.git ls-remote origin refs/tags/v0points to thev0.53.0commit. Craft logs only a warning when it cannot move a floating tag. From the next release on,autoworks, becausev0.53.0is on main.Verification
pnpm build:actionoutput is deterministic, the same on Node 22 and Node 24, and byte-identical to thedist/actionon the publishedv0.52.0tag (all 50 files).bin/check-action-dist.shpasses on the committed bundle after a rebuild, and fails on a changed file and on an untracked new chunk.git check-ignoreconfirms.d.tsand.mapoutput andpackages/*/diststay ignored.validate-action-layout --require-distpasses.npx @sentry/craft@3.11.1 changelog) in a scratch repo withv0andv0.53.0on the same commit (both annotated, and both lightweight):git describe --tags --match 'v*'returnsv0, and Craft picksv0.53.0as the base. Craft source at 3.11.1 skips floating tags for prereleases inupdateFloatingTags.commit-action-dist.yml's scripts against a local bare remote: no artifact and an empty artifact make no commit, symlinks and FIFOs in the artifact are rejected, unchanged content makes no commit, a changed and a new chunk are committed and pushed, hooks do not run, and a push after the branch moved is rejected as non-fast-forward. The realworkflow_runpath is not verified until after merge.actionlint1.7.12 passes. Its only finding iscopilot-requests, a scope it doesn't know yet (same on junior'srelease.yml).shellcheck --shell=sh --enable=check-extra-masked-returnspasses on the new scripts.pnpm lintand typecheck pass.pnpm test: 2091 pass. The 9src/skills/remote.test.tsreal-git tests fail in my sandbox only, because its git wrapper rejects the test's commit author. CI is the source of truth there.craft prepareend to end, and the Release workflow was not triggered.The bundle went in as three commits (part 1 to 3) because the sandbox's push proxy rejects large packs.
via @BYK.
--
View Session [Sentry]