Skip to content

feat(release): scripted draft/publish release flow, plus release CI fixes - #2952

Merged
mikeland73 merged 3 commits into
mainfrom
mikeland73/devbox-release-workflow-audit
Aug 16, 2026
Merged

feat(release): scripted draft/publish release flow, plus release CI fixes#2952
mikeland73 merged 3 commits into
mainfrom
mikeland73/devbox-release-workflow-audit

Conversation

@mikeland73

Copy link
Copy Markdown
Collaborator

Summary

Releasing meant pushing a tag, hand-writing a draft, then publishing from the GitHub UI — an ordering that races the build, because publishing from the UI creates the tag and publishes in one action, so docker-image-release starts downloading the release tarballs before goreleaser has uploaded them (it failed that way on both 0.17.3 and 0.17.5), and with no draft to attach to goreleaser writes its default body, the bare commit-SHA list that shipped as 0.17.5's notes. scripts/release.ts encodes the order that avoids both — draft → tag → wait for the build → publish — behind devbox run draft-release and devbox run publish-release, each walking every step, prompting for the tag/title/description, and resuming rather than duplicating work if a run fails partway; publish-release can also finish a draft that already exists. Preflight additionally catches the flake.nix version drift that left lastTag at 0.17.3 across both the 0.17.4 and 0.17.5 releases. Separately, this fixes three release-pipeline bugs found while auditing: Sentry releases named devbox@refs/tags/X instead of devbox@X, prereleases overwriting the Docker latest tag (0.17.0-dev and 0.17.0-deva both did), and a fail-fast test matrix where one failing macOS shard cancelled every other shard.

Node runs the script directly via type stripping, so there's no build step and no node_modules; nodejs-slim is added with its plugin disabled, since the nodejs plugin would otherwise install a Corepack init_hook that runs on every devbox run in this repo.

How was it tested?

All four devbox run scripts were exercised end to end against the live repo: release-changes analyses the 5 commits since 0.17.5 and recommends 0.18.0 (minor, 4 breaking), release-status reads back 0.17.5's real state (published, 7 assets, cli-release success), and both draft-release and publish-release are correctly stopped by preflight on the dirty tree and red main. Workflow changes were validated with actionlint, which reports no new warnings.

The mutating steps — draft creation, tag push, publish — have not been exercised, because no release can currently be cut: main has been red since 2026-07-02 on the macOS zig-hello-world example test (build.zig uses the pre-Zig-0.12 API while devbox.lock pins zig 0.11.0), which cli-release gates on. That test is not fixed here and remains the blocker for 0.18.0.

Community Contribution License

All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.

By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.

🤖 Generated with Claude Code

mikeland73and others added 2 commits August 16, 2026 10:06
Three independent bugs in the release pipeline:
- cli-release passed `github.ref` to the Sentry release action, producing
releases named `devbox@refs/tags/0.17.5` instead of `devbox@0.17.5`. The
edge job already used the bare version; use `github.ref_name` here too.
- docker-image-release moved the `latest` tag unconditionally, so publishing
a prerelease overwrote jetpackio/devbox:latest with it. Both 0.17.0-dev and
0.17.0-deva did exactly that. Gate the `latest` steps on the release not
being a prerelease, with a `push_latest` input for manual dispatch.
- The cli-tests `test` matrix ran with the default fail-fast, so a single
failing macOS shard cancelled every other macOS shard. That matrix gates
releases via cli-release, so when it goes red we want the full picture
rather than the first shard to fail.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Releasing meant pushing a tag, hand-writing a draft, and publishing from the
GitHub UI. That ordering is fragile: publishing from the UI creates the tag
and publishes in one action, so docker-image-release starts downloading the
release tarballs before goreleaser has uploaded them. It failed that way on
both 0.17.3 and 0.17.5. And with no draft to attach to, goreleaser writes its
default body -- the bare list of commit SHAs that shipped as 0.17.5's notes.
scripts/release.ts encodes the order that avoids both: draft, then tag, then
wait for the build, then publish. Two entry points, `devbox run draft-release`
and `devbox run publish-release`, each walking every step and prompting for
the tag, title and description. publish-release can also finish a draft that
already exists. Every step is idempotent, so a run that fails partway resumes
instead of duplicating work.
Preflight also catches the flake.nix version drift that left lastTag at 0.17.3
across both the 0.17.4 and 0.17.5 releases.
Node runs the script directly via type stripping, so there's no build step and
no node_modules. nodejs-slim is added with its plugin disabled -- the nodejs
plugin installs a Corepack init_hook that would otherwise run on every
`devbox run` in this repo.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 16, 2026 17:07

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mikeland73
mikeland73 merged commit a51bc74 into mainAug 16, 2026
25 checks passed
@mikeland73
mikeland73 deleted the mikeland73/devbox-release-workflow-audit branch August 16, 2026 18:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mikeland73