Repository navigation
ci(release): Move to Craft auto versioning - #117
Merged
Merged
Conversation
Replace getsentry/action-prepare-release with getsentry/craft@v3 and pass the full bump set (auto, pre, patch, minor, major) plus an exact version override. Craft now computes the version, so the local version calculator is gone. Craft reads the reachable vX.Y.Z-src source tags as prereleases, so the release job now points local vX.Y.Z tags at their source commits before Craft runs. The previous source-tag checks move into the same script.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
requested changes
Nov 6, 2026
Commit github-reporter/dist/action/index.js on main and check in CI that it matches a fresh build, the standard pattern for JavaScript actions. Craft now tags release commits that already contain the bundle, so the detached bundle commits, vX.Y.Z-src source tags, and the local tag remap before craft prepare all go away. The action tag workflow only moves vX on stable releases.
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 pull requests, rebuild github-reporter/dist and push it back with the release bot token so CI runs again on the new commit. Fork PRs, Dependabot, and main cannot be pushed to here, so the job still fails when the bundle is stale. Keep the update-action-tag workflow instead of Craft floatingTags: Craft puts the floating tag on the release commit, so git describe returns v0 and auto versioning starts from 0.0.0. It also moves v0 on prereleases. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
The bundle job ran pnpm install and the build in the same job as the release bot token, so a compromised dependency could read the token. Build and compare with read-only credentials, pass a stale bundle as an artifact, and push it from a separate job that only runs git.
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>
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Co-Authored-By: Burak Yigit Kaya <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 e83288c. Configure here.
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 the full bump set, the same as
getsentry/junior. Review feedback then asked to remove the release-tag workarounds.What changed
Release workflow
release.ymlnow usesgetsentry/craft@v3and no longer usesgetsentry/action-prepare-release@v1. It passes these inputs:version: ${{ inputs.version || inputs.bump }}forcellm_api_key: ${{ github.token }}release.ymlalso gets thecopilot-requests: writepermission.bump:auto(default),pre,patch,minor,majorversion: an optional exact versionforceprereleaseandprerelease_id.prefor analphaprerelease of the version thatautowould release.betaorrcline, setversion, for example0.19.0-beta.0.scripts/calculate-release-version.mjsis removed. Craft now computes the version.Action bundle on
maingithub-reporter/dist/action/index.jsis now committed. It is no longer gitignored,.gitattributesmarks itlinguist-generated, and Biome skips it.pull_request:action-bundle(test.yml) checks out the PR head withpersist-credentials: false, installs, and runsscripts/check-action-bundle.sh(pnpm build:action) with no secrets. On same-repo PRs that Dependabot did not open, a stale bundle is uploaded as theaction-bundleartifact. On fork PRs, Dependabot PRs, andmain, a stale bundle fails the job. A stale bundle can only reachmainpast a failing check.testjob, which builds the PR merge commit, also runsscripts/check-action-bundle.shin fail-only mode. A bundle that is fresh on the branch but stale after the merge withmaincannot go green. To fix it, merge or rebase onmain, and CI then rebuilds the bundle.push-action-bundle.ymlruns onworkflow_runwhenTestcompletes. GitHub always runs this file frommain, so a PR cannot change it.workflow_runpayload:head_sha,head_branch,head_repository. It runs only when the event ispull_request, the head repo is this repo, the actor is not Dependabot, and the branch is not the default branch orrelease/*.scripts/find-action-bundle-artifact.shandscripts/push-action-bundle.sh. The PR is checked out in a separate directory athead_shawithpersist-credentials: false. No PR code runs.actions: read) and treats it as untrusted data. The push script accepts only regular files and directories underaction/, so symlinks, special files and extra entries fail. It also checks that the checkout is athead_sha.head_sha, so a moved branch is rejected and the new head gets its own run. The app token push starts CI again, and that run finds no change because the build always gives the same bytes.workflow_runonly runs from the default branch, so the first real run happens after this merges.vX.Y.Z-srctagsvX.Y.Zcraft prepare--no-ff, sovX.Y.Zis reachable frommain.v0now moves through Craft's github target,floatingTags: ["v{major}"], andminVersionis3.11.1.scripts/update-major-tag.shandupdate-action-tag.ymlare deleted. Craft 3.11.1 (fix(github): Skip prereleases and ignore floating tags in version lookup craft#969) fixes the two bugs that blocked this before. Prereleases do not move floating tags. The previous-release lookup (getLatestTag,getLatestStableTag,getChangelogBaseTag) skips tags without a fullmajor.minor.patch, such asv0.v0lands on the release commit, which already contains the bundle, so@v0users get it.merge-jobs.ymlrunssh scripts/check-action-bundle.shonrelease/*instead of only building. A stale bundle on a release branch fails a status check, so Craft does not publish it.pnpm release:checknow fails if the action entrypoint is not committed. Its fixture and a new test cover this.First-release baseline guard
scripts/check-release-baseline.shruns in a new "Check release baseline" step inrelease.yml, only whenversionis empty. The checkout fetches tags.mainreaches and that matchesv[0-9]*.[0-9]*.[0-9]*isv<version>frompackages/vitest-evals/package.json, the file the release bumps. Prerelease tags count, because publish merges a prerelease version intomain.v0does not match the pattern. The error says to pass an exactversion.0.18.0-srcon today'smain.auto,patchandminorwould then fail with "Nothing to commit",majorwould release1.0.0, andprewould probably publish a-srcprerelease.Merge of
mainmain(feat(report-ui): Add local report viewer for iterating on evals #115). It keeps the newreport-ui-visualjob next toaction-bundleand keeps both.gitignoreentries. 517b625 rebuilds the bundle, because feat(report-ui): Add local report viewer for iterating on evals #115 changedpackages/core/src/report/metadata.ts.Why the old flow existed
The bundle was gitignored, so
update-action-tag.ymlbuilt it after Craft published. The workflow committed the bundle on a commit outsidemain, then force-movedvX.Y.ZandvXto that commit. As a result,maincould reach only thevX.Y.Z-srctags. Craft parses those tags as prereleases. A dry run on today'smaingivesauto→0.18.0-src -> 0.18.0, which is a release that already exists.Transition (one time)
mainstill reaches only-srctags, so the baseline guard stops any release withoutversion. For the first release after this merges, setversionto an exact version, for example0.18.1. That release createsv0.18.1on a commit thatmaincan reach. After that,autoand the bump types work.After the first release, run
git ls-remote origin refs/tags/v0and check thatv0points at thev0.18.1commit. Craft moves floating tags on a best-effort basis: if the move fails, it only logs a warning. The README documents both steps. This PR does not push, move, or delete any tags.Changelog preview uses the same tag lookup, so it lists the full history until that first release. After the first release it works normally. There is no Craft setting that fixes this before then, so the changelog-preview workflow is unchanged.
Verification
actionlint1.7.12: the only new finding is the unknowncopilot-requestsscope. junior's live workflow gets the same finding.shellcheck --shell=sh --enable=check-extra-masked-returns: passes on both new scripts.dash:main, and setsstale=trueon a same-repo PR.check-action-bundle.shwithoutCAN_PUSHexits 1 after a change tosrc/action/main.ts, and it passes on the committed bundle.npx @sentry/craft@3.11.1 prepare --dry-run), in a scratch repo withv0andv0.18.1on the same commit (where rawgit describereturnsv0):auto→0.18.1 -> 0.19.0,patch→0.18.2,pre→0.19.0-alpha.0. On today'smain,autostill gives0.18.0-src -> 0.18.0, so the transition note still applies.dash, against scratch repos:main(only-srctags): fails with the exact-version error.version: the step is skipped.v0.18.1release, withv0on the same commit: passes.push-action-bundle.shunderdash, against a local bare remote, run from outside the PR checkout:head_sha, a symlink, an extra top-level file and a FIFO in the artifact are each rejected..git/config.find-action-bundle-artifact.shagainst a fakegh: it setsfoundonly when the artifact exists, and fails on an API error.test,action-bundle, CodeQL, Secret Scan, Socket and the reporter smoke test pass. The newworkflow_runworkflow has not run yet, because it only runs frommain.craft prepare --dry-run(Craft master build, before 3.11.1):0.18.1is accepted.v0.18.1release and afeatcommit:auto→0.19.0pre→0.19.0-alpha.0patch→0.18.2pnpm release:check, the release-config tests (6/6),pnpm lint, andpnpm buildpass.pnpm test:ci: 409 tests pass. One test fails:report-ui"returns 500 when asset reads fail". That test needschmod 000to block reads, and my sandbox ignores file permissions. That failure is not related to this PR.I did not run the Release workflow.
via @BYK.
--
View Session [Sentry]