Skip to content

chore: replace custom versioning scripts with release-it#1783

Merged
mariechatfield merged 14 commits into
mainfrom
marie/chore-release-script
May 12, 2026
Merged

chore: replace custom versioning scripts with release-it#1783
mariechatfield merged 14 commits into
mainfrom
marie/chore-release-script

Conversation

@mariechatfield
Copy link
Copy Markdown
Contributor

@mariechatfield mariechatfield commented May 12, 2026

Summary

Update the release process to use the release-it library so that we have deterministic behavior. The /release command should still work from claude and cursor, but calls a script instead of running through the process itself.

Changes

/release skill

  1. Run npm run release to choose the next version and generate a changelog entry
    a. The command will checkout a new branch chore/release-VERSION and commit the changes to package.json and CHANGELOG.md
  2. Have the agent format and improve the generated changelog to be more human readable, include additional relevant context, and bundle or omit unnecessary information
  3. Have the agent push the commit to a new branch and open a PR automatically

Also accepts /release --dry-run to see what will happen and preview the changelog.

publish.yaml action
Publishes a git tag for the version to GitHub, which is used by npm run release to calculate the next list of commits in a changelog.

auto-version.yaml action
Renamed to prepare-release.yaml and uses release-it as well to prepare a PR for review.

pr-title-check.yaml action
Now uses commitlint to validate the PR title instead of using a separate custom script.

Demo

Sample output for using the release skill:

❯ /release --dry-run                                                                                                     
                                                                                                                         
⏺ Running the dry-run now.                                                                                               
                                                                                                                   
⏺ Bash(npm run release -- --dry-run --ci 2>&1)                                                                           
  ⎿  > @gusto/embedded-react-sdk@0.44.1 release                                                                          
     > release-it --dry-run --ci                                                                                         
     … +53 lines (ctrl+o to expand)                                                                                      
  ⎿  Allowed by auto mode classifier                                                                                     
                                                                                                                         
⏺ Target version: 0.44.2                                               
                                                                                                                         
  Here's the curated changelog as it would appear in CHANGELOG.md:                                                       
                                                 
  ---                                                                                                                    
  0.44.2                                                                               
                                                 
  Fixes

  - Fix UTC roundtrip bug in date picker field where dates near midnight could shift by one day (#1767)                  
  - Prevent skeleton/gap flash when TransitionPayrollAlert renders with no alerts to display (#1773)
                                                                                                                         
  Chores & Maintenance                                                                 
                                                                                                                         
  - Bump i18next to 26.1.0                                                             
  - Bump dev dependencies (@playwright/test, typescript-eslint, vitest)

  ---
  Decisions made:
                                                                                                                         
  - Features section omitted — the only feat commit (sdk-app: fly out panels) is an internal dev-app enhancement with no
  consumer impact                                                                                                        
  - Chores: All the release tooling commits from this PR branch (release-it, skill updates, docs) are internal and
  omitted; i18next is a runtime dep so it gets its own line; the three dev dep bumps are collapsed; the docs and CI      
  commits are omitted                                                                  
  - Version header simplified from ## [0.44.2](...) (2026-05-12) to ## 0.44.2 to match existing style                    
  - Hash links removed, PR links kept                                                                                    
                                                                                                                         
✻ Cooked for 56s                                          

mariechatfield and others added 9 commits May 12, 2026 13:34
- Add release-it + @release-it/conventional-changelog for interactive
  release preparation (npm run release creates branch, bumps version,
  updates CHANGELOG, commits)
- Add prepare-release.yaml workflow_dispatch for CI-triggered releases
- Replace pr-title-check.yaml custom JS with commitlint via stdin
- Remove build/versioning/ custom scripts (conventionalCommits.js,
  updateChangelog.js) now superseded by release-it and commitlint
- Update CONTRIBUTING.md and release skill to reflect new workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Breaking changes bump MINOR (not MAJOR) while we're pre-1.0.
Remove preMajor from .release-it.json when intentionally shipping 1.0.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
With squash merges, a tag on the PR branch commit is unreachable from
main history after merge, breaking future `git log <tag>..HEAD` ranges.
Create the version tag in the publish action instead, where it correctly
lands on the main branch commit.

Also created v0.44.1 tag retroactively so release-it has a starting point.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After release-it commits the mechanical draft, Claude should rewrite
the new CHANGELOG section to match the existing human-readable style:
blank lines, - bullets, no hash links, consumer-focused descriptions,
and collapsed dep bumps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When --dry-run is passed, run release-it in dry-run mode, extract the
proposed version and changelog from the output, and present a curated
preview without making any file changes or git operations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mariechatfield
Copy link
Copy Markdown
Contributor Author

#1785 is generated against this branch as a sample. Once this PR is merged, I will close that one and run the release command against main

mariechatfield and others added 3 commits May 12, 2026 14:30
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mariechatfield mariechatfield marked this pull request as ready for review May 12, 2026 21:44
@mariechatfield mariechatfield enabled auto-merge (squash) May 12, 2026 21:53
@gusto-fresh-eyes
Copy link
Copy Markdown

gusto-fresh-eyes Bot commented May 12, 2026

Fresh Eyes Review

Found 1 issue in this PR.

PR Description Issues

  • Minor | claims-vs-reality: Description claims auto-version.yaml was 'Renamed to prepare-release.yaml' but the diff shows auto-version.yaml was deleted entirely and prepare-release.yaml is a brand new file with completely different logic (different trigger conditions, different implementation using release-it + gh pr create). This is a replacement, not a rename.

Download findings.json — drag the file into Claude or use /add to propose fixes


Generated by Fresh Eyes Reviewer | Share feedback in #ai-code-reviews

Comment thread .github/workflows/pr-title-check.yaml Outdated
Comment thread .github/workflows/publish.yaml Outdated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@jeffredodd jeffredodd left a comment

Choose a reason for hiding this comment

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

I've never used release-it but i'm excite dto try new things! Thanks for helping make our release process better! 🎉

@mariechatfield mariechatfield merged commit 4287eed into main May 12, 2026
19 checks passed
@mariechatfield mariechatfield deleted the marie/chore-release-script branch May 12, 2026 22:41
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