A reference guide on how to do releases of the VF monorepo's tools and components.
- We publish to npm with Lerna
- Versions in
vf-core
- Updating component versions
- Have installed Lerna globally
- Installed dependencies in
/tools/vf-core/
withyarn install
- Installed dependencies in root folder with
yarn install
- Have logged in to a npm account belonging to the visual-framework organization
- select the
develop
branch- reminder: we don't use
master
- reminder: we don't use
- see a list of changed packages
lerna changed
- ensure all packages to be released have ready an updated changelog and to which version are going to be bumped
- verify the new versions of each package doesn't exist on npm
- test publish
yarn run lerna:test
- publish to npm
yarn run lerna:publish
- lerna will prompt the versions of all packages twice
- 1st one to publish the packages to npm
- 2nd one to update package.json files of all packages published
- update the expected new tag version to
/tools/vf-component-library/src/site/_data/siteConfig.js
- see last tag
git describe --abbrev=0 --tags
- see last tag
- Remove
dev
fromvfVersionPrefix
in/tools/vf-component-library/src/site/_data/siteConfig.js
, this is needed only for development - generate an update
yarn run releasenotes
- format and review the newly made file at
tools/vf-component-library/src/site/updates
- copy structure from previous release notes
- for each component, put latest changelog updates and link it with
releaseLinks.notes
- commit and push changes to the
develop
branch- commit message in a format of:
Component release 20211130-01
- commit message in a format of:
- add a tag
- see last tag
git describe --abbrev=0 --tags
- add a semantic versioned tag
git tag -a v2.5.2-beta.5 -m 'Release of precompiled CSS, JS, assets'
- Why like this?
- We do not add tags per individual component version. However, Lerna needs a named tag to see what has changed. With our method we get one tag per release bundle and avoid tag spamming in the release history.
- Trigger a deploy to the CDN (i.e.
v2.5.0
) https://assets.emblstatic.net/vf/v2.4.10/css/styles.css
- see last tag
- push the tag
git push origin --tags
- add release notes to the tag and link to the new blog post
lerna ls
list all packages known to lernalerna ls --since af04cb2a
list all changed packages since a commit (sadly not combinable with lerna publish)lerna diff
all changes since last publishlerna changed
all packages changed