Skip to content

fix(publish): keep per-package and baseline tags in --input - #684

Merged
goosewobbler merged 5 commits into
mainfrom
fix/675-publish-input-passthrough
Oct 22, 2026
Merged

goosewobbler merged 5 commits into
mainfrom
fix/675-publish-input-passthrough

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Description

publish --input validated its input with z.object schemas, which strip undeclared keys. updates[].tag and baselineTags were lost, so per-package mode never ran and baseline tags were never created. Any other VersionOutput field the schema didn't list was lost too. release and standing-pr publish pass the output in memory and were unaffected.

The schemas now use z.looseObject and declare tag and baselineTags. A round-trip test checks that a fully populated VersionOutput comes back from parseInput unchanged.

Keeping the tags lets publish --input reach per-package mode, which had two gaps: baseline tags were never pushed, and under --skip-publish nothing was pushed and no GitHub releases were created. The final push stage now also runs in per-package mode, after every package has published, so it adds the remaining tags (or pushes everything under --skip-publish). That also fixes baseline tags for release and standing-pr publish in per-package mode, which had the same gap.

The push stage also pushed every local tag (git push --tags), in batch mode too. It now pushes only the tags this run recorded, each by explicit ref.

Related Issue(s)

Closes #675

Type of Change

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

New input.spec.ts tests cover per-package and baseline tags surviving parseInput, rejection of a non-string tag, and a full round-trip; all three fail on the old schema. The round-trip fixture is typed with Required<…>, so a new VersionOutput field is a type error in the editor until the fixture includes it. CI won't catch that, because publish's typecheck excludes test files.

pipeline.spec.ts: per-package mode runs the final push once, after the last package tag, and not when a package fails; per-package input with skipPublish still pushes and creates GitHub releases. Both fail with the old guard.

parseInput's body is untouched, so #616 should rebase cleanly.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the unrelated-tag push is fixed and no new blocking issues were found.

Summary

The PR keeps per-package and baseline tags when reading publish input, then pushes baseline tags after all packages succeed.

  • Publish input keeps package and baseline tags.
  • Per-package runs push the remaining tags after publishing succeeds.

Reviews (3) · Last reviewed commit: "fix(publish): push only this release's t..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 4h 13m · ✅ ready to merge

Release Preview — v0.41.2 → v0.41.3

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.41.3

Changed

  • fix the skipped-bump entries (troubleshooting) (PR #695)

Fixed

  • trim push-stage comments (publish)
  • drop redundant schema comment (publish)
  • push only this release's tags (publish)
  • push baseline tags, and push at all under --skip-publish, in per-package mode (publish)
  • keep per-package and baseline tags in --input (publish) (#675)

All packages → 0.41.3 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.41.3 0.42.0

Updated automatically by ReleaseKit

Comment thread packages/publish/src/stages/input.ts
Comment thread packages/publish/src/stages/input.ts
github-actions Bot and others added 2 commits October 22, 2026 23:11
The publish input schema used z.object, which strips undeclared keys,
so `releasekit publish --input` dropped updates[].tag (per-package
mode) and baselineTags (baseline tag creation), along with every other
VersionOutput field the schema didn't list.

Switch the schemas to z.looseObject, declare tag and baselineTags, and
add a round-trip test over a fully populated VersionOutput so the
schema can't fall behind the type again.

Closes #675

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h, in per-package mode

Per-package mode pushed each package's own tag inside the publish loop and
skipped the final push, so baseline tags never reached the remote, and with
--skip-publish nothing was pushed and no GitHub releases were created. Now
that publish --input keeps per-package tags, that path is reachable from the
CLI too. Run the final push in per-package mode as well: after every package
publishes it adds the remaining tags, and under --skip-publish it pushes
everything as batch mode does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@goosewobbler
goosewobbler force-pushed the fix/675-publish-input-passthrough branch from e5bdb65 to 50f83f5 Compare October 22, 2026 22:11
@goosewobbler

Copy link
Copy Markdown
Owner Author

@greptileai review plz

Comment thread packages/publish/src/pipeline/index.ts
github-actions Bot and others added 3 commits October 22, 2026 23:20
The push stage ran `git push --tags`, publishing every local tag. Push each
tag the run recorded by explicit ref instead, so an unrelated or conflicting
local tag can't be published or fail the push after packages are out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round-trip test fails if the schemas go back to stripping fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

publish --input drops per-package tags and baseline tags from the version output

1 participant