Skip to content

fix: create git tags in release.ts for changesets/action#20

Merged
SutuSebastian merged 1 commit into
mainfrom
fix/release-create-git-tags
Jul 17, 2026
Merged

fix: create git tags in release.ts for changesets/action#20
SutuSebastian merged 1 commit into
mainfrom
fix/release-create-git-tags

Conversation

@SutuSebastian

@SutuSebastian SutuSebastian commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • After a successful npm publish, scripts/release.ts now creates an annotated name@version git tag (idempotent if it already exists) before printing New tag: ….
  • Unblocks changesets/action with createGithubReleases: true — it can push the tag and open a GitHub Release instead of failing with src refspec does not match any.

Test plan

  • Review ensureReleaseTag in scripts/release.ts
  • Next version-package merge: Release job green through tag push / GitHub Releases (or dry-run locally with a throwaway tag name)

Summary by CodeRabbit

  • Chores
    • Release automation now creates an annotated version tag for each package release.
    • Existing tags are detected to prevent duplicate tag creation.
    • Release output now clearly reports the tag generated for each package version.

Print New tag: only after an annotated tag exists so the Release workflow can push tags and open GitHub Releases instead of failing on missing refspecs.
@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 21004d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0b09058-eb77-4952-b5f2-87aedccbb907

📥 Commits

Reviewing files that changed from the base of the PR and between 40f767d and 21004d8.

📒 Files selected for processing (1)
  • scripts/release.ts

📝 Walkthrough

Walkthrough

The release script now ensures each package version has an annotated Git tag before printing the tag message consumed by the release action.

Changes

Release tagging

Layer / File(s) Summary
Ensure annotated release tags
scripts/release.ts
The release loop computes each package tag, checks whether it exists, creates it with an annotation when absent, and then logs the tag.
Estimated code review effort: 2 (Simple) ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseScript
  participant Git
  participant ChangesetsAction
  ReleaseScript->>Git: Check package tag with git rev-parse
  Git-->>ReleaseScript: Tag exists or is missing
  ReleaseScript->>Git: Create annotated tag when missing
  ReleaseScript->>ChangesetsAction: Print New tag: name@version
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: creating git tags in release.ts to support changesets/action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-create-git-tags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SutuSebastian
SutuSebastian merged commit 534f49f into main Jul 17, 2026
15 checks passed
@SutuSebastian
SutuSebastian deleted the fix/release-create-git-tags branch July 17, 2026 22:22
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.

1 participant