Skip to main content

Release

Work in progress

Solve "error Package marked as private, not publishing."​

Make packages public by adding this config in every public package:

 "publishConfig": {
"access": "public"
}

Script​

# Merge potential hotfixes
git checkout main && git pull
# Check missing dependencies (NOTE: there might be false positive and false negative, be careful! Don't remove too many "unused" packages!)
# - Ignore dependencies to storybook or jest (handled at the root level)
# - Beware of things that should stay peer deps, like React
# - Ignore dependencies that should disappear (work in progress)
yarn run depcheck
# Clear all node_modules => yarn install will do that already
# yarn clean
# Reinstall to get a fresh version (takes a while)
yarn
# Build
yarn build
# Typechecking
yarn typecheck
# Run storybook without issue
yarn build:storybook
# Unit test
yarn test
# Update typedoc
yarn typedoc && npx serve generated/docs
# Test built docusaurus (already built during "yarn build" stage)
yarn serve:doc

# Deploy (Lerna will prompt questions for versionning)
# NOTE: "yarn publish" already has a meaning so we can't override it, we need to call "yarn lerna publish"
# NOTE: directly calling learn publish might publish only changed package, but change detection is not always reliable
# so we may use force publish
yarn lerna publish # --force-publish
# Changelog update
yarn run auto-changelog
git commit -am "bump version"
git push
git push --tags

Publish starters on GitHub​

Check Next release doc

# /!\ Follow each specific starter release guide before publishing
node ./scripts/push-starters.mjs

Simpler script​

If you want to trigger a release quickly without manually checking deps or whatever, you can simply run the Github workflow locally:

git checkout main && git pull
# yarn add -g act # @see https://github.com/nektos/act
act # this will run the same steps as the release basically
# PLEASE always build before publishing! Otherwise you will publish empty packages
yarn run build
yarn lerna publish # --force-publish
# Changelog update
yarn run auto-changelog
git commit -am "bump version"
git push
git push --tags