Publish a release
The library is not on npm: a release is a git tag, and sites install it with
github:velezanthony/design#<tag>.
Step by step
-
Everything green on
main:npm test,npm run lint,npm run format:check,npm run checkandnpm run docs:buildwithout warnings. If you have touched the structure, also look atnpm pack --dry-run(see Why onlysrc/goes into the package). -
Bump
versionin the PR withnpm version <number> --no-git-tag-version, following semver: patch for fixes, minor for new, compatible options or components, and major for anything that forces a change in the config, the content or the imports. While the version is0.x, an incompatible change bumps the minor. In the same PR, write the release’s section inCHANGELOG.md. -
Tag and publish after the merge, on the merge commit:
git checkout main && git pull git tag v0.2.0 git push origin v0.2.0 gh release create v0.2.0 --verify-tag --title v0.2.0 # paste its CHANGELOG section as notes -
Update each site by changing the tag, build and review the warnings:
npm install --prefix docs github:velezanthony/design#v0.2.0
Before tagging, try it in the playground/, the consumer that exercises the most surface. Any change
in src/ (except tests, fixtures, testing/ and pages/) reaches the sites with the next tag.
The documentation site
This site is not published with the tags: .github/workflows/docs.yml deploys it on every push to
main that touches docs/**, src/**, package.json, package-lock.json or the workflow itself (and
by hand with workflow_dispatch). As docs/ uses file:.., it is built with the code of that same
commit. The build step receives PUBLIC_GTM_ID from the repo secret; without it, the site has no
analytics. Requirement on GitHub: Settings → Pages → Source: GitHub Actions.
Next step
Back to the start of the section: Internals.