How to cut a release of @greenfinity/rescript-next. The package is published
to Greenfinity's private registry (https://npm.greenfinity.hu/), configured
under npmScopes.greenfinity in .yarnrc.yml; auth lives in the global
~/.yarnrc.yml. Tooling: Yarn Berry (4.x) + auto-changelog.
- The feature PR(s) for this release are merged into
main, and you are onmain, up to date (git pull --ff-only). - Feature PRs must not bump the
versionfield — the release does that.
Run these on main:
-
Bump the version.
yarn version minor # or: yarn version patch (semver: minor for features, patch for fixes)Berry edits
package.jsononly — it does not commit or tag. -
Generate the changelog.
yarn changelog # runs `auto-changelog -p && git add HISTORY.md`-pmakes it use the newpackage.jsonversion as the latest section. It picks up merged PRs / commits since the previous tag and prepends them toHISTORY.md. -
Commit the release. Stage
package.json+HISTORY.mdand commit with a message prefixedRelease,:git add package.json HISTORY.md git commit -m "Release, vX.Y.Z"Why the prefix:
.auto-changelog'signoreCommitPatternfilters out any commit containingRelease/release(andChore/chore), so release commits never clutter the changelog. Every commit you make onmainduring a release (including the RELEASE.md update below) must carry theRelease,prefix. -
Tag the release following the
v<version>convention:git tag vX.Y.Z
-
Publish to the private registry:
yarn npm publish
The package ships
src/(both.resand the compiled.bs.mjs) +rescript.json— runyarn rescript buildfirst if the artifacts might be stale. If we ever move the package to the public npm registry instead, the command isyarn npm publish --access public(the--access publicflag is not used for the private registry). -
Push the branch and only the new tag (never
git push --tags, which would push every local tag):git push git push origin vX.Y.Z
Changes to RELEASE.md itself go in a final commit on main, also prefixed
Release, (so it stays out of the changelog), e.g.
git commit -m "Release, update RELEASE.md".