Skip to content

ci: harden alpha release publishing - #282

Merged
fforootd merged 4 commits into
mainfrom
codex/investigate-go-release-timing
Jun 13, 2026
Merged

ci: harden alpha release publishing#282
fforootd merged 4 commits into
mainfrom
codex/investigate-go-release-timing

Conversation

@fforootd

Copy link
Copy Markdown
Member

Summary

  • Block alpha train completion when Changesets only creates the Version Packages PR and npm did not publish.
  • Preserve GoReleaser recovery when the release tag already exists.
  • Treat npm CLI dist-tag promotion as best-effort so OIDC dist-tag auth failures do not block GitHub Release/GHCR recovery.

Validation

  • corepack pnpm nx test @zitadel/cli
  • corepack pnpm changeset status --output /tmp/nextgen-changeset-status.json && node scripts/check-alpha-release-plan.mjs /tmp/nextgen-changeset-status.json
  • corepack pnpm run check -- --only node
  • corepack pnpm --filter @zitadel/cli test -- --run tests/unit/scripts/check-alpha-release-plan.test.ts tests/unit/scripts/release-alpha-train.test.ts

Release notes / changeset

  • Empty changesets added for CI-only release workflow fixes.

Notes

  • Existing remote artifacts for v0.1.0-alpha.4 were not deleted or modified.
  • The npm packages for 0.1.0-alpha.4 published successfully in the observed run; the failure was the follow-up dist-tag mutation.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextgen Ready Ready Preview, Comment Jun 13, 2026 4:57pm

Request Review

@fforootd
fforootd marked this pull request as ready for review June 13, 2026 16:56
Copilot AI review requested due to automatic review settings June 13, 2026 16:56
@fforootd
fforootd enabled auto-merge (squash) June 13, 2026 16:57
@fforootd
fforootd merged commit f9151ee into main Jun 13, 2026
14 checks passed
@fforootd
fforootd deleted the codex/investigate-go-release-timing branch June 13, 2026 16:58

Copilot AI 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.

Pull request overview

This PR hardens the alpha release CI workflow by making npm dist-tag promotion non-blocking and ensuring the alpha train completion logic correctly reflects whether publishing actually occurred, while preserving GoReleaser recovery for pre-existing tags.

Changes:

  • Make npm dist-tag add ... latest best-effort (non-fatal) during the alpha train, and enforce this via check-alpha-release-plan.
  • Update CI workflow and unit tests to align with the best-effort dist-tag behavior.
  • Add an empty changeset to record CI-only workflow behavior changes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/check-alpha-release-plan.mjs Adds a guard to ensure the workflow doesn’t fail the alpha train when npm latest dist-tag promotion fails.
apps/cli/tests/unit/scripts/check-alpha-release-plan.test.ts Updates the expected workflow snippet and adds a regression test for best-effort latest promotion.
.github/workflows/ci.yml Makes CLI alpha/latest dist-tag operations best-effort via `
.changeset/fix-alpha-dist-tag-promotion.md Adds an empty changeset for CI-only workflow changes.

Comment on lines +289 to +293
assertContains(
releaseJob,
'npm dist-tag add "@zitadel/cli@$version" latest ||',
"release-alpha-train must not fail the alpha train when npm latest dist-tag promotion fails",
);
Comment on lines +228 to +239
it("rejects a workflow that fails the train when npm latest promotion fails", async () => {
const { cwd, statusPath } = await fixtureRepo({
ciWorkflow: validCiWorkflow().replace(
' npm dist-tag add "@zitadel/cli@$version" latest || echo "::warning::Unable to promote @zitadel/cli@$version to npm latest dist-tag"',
' npm dist-tag add "@zitadel/cli@$version" latest',
),
});

await expect(
checkAlphaReleasePlanModule.checkAlphaReleasePlan({ cwd, statusPath }),
).rejects.toThrow("must not fail the alpha train when npm latest dist-tag promotion fails");
});
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.

2 participants