Skip to content

Latest commit

 

History

History
70 lines (55 loc) · 3.13 KB

PUBLISHING.md

File metadata and controls

70 lines (55 loc) · 3.13 KB

PUBLISHING

A reference guide on how to do releases of the VF monorepo's tools and components.

Notes

Prerequisites

  • Have installed Lerna globally
  • Installed dependencies in /tools/vf-core/ with yarn install
  • Installed dependencies in root folder with yarn install
  • Have logged in to a npm account belonging to the visual-framework organization

Release workflow

1. Component pre-release

  1. select the develop branch
  2. see a list of changed packages
    • lerna changed
  3. 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
  4. test publish
    • yarn run lerna:test

2. Component release

  1. 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

3. Communications

  1. update the expected new tag version to /tools/vf-component-library/src/site/_data/siteConfig.js
    • see last tag git describe --abbrev=0 --tags
  2. Remove dev from vfVersionPrefix in /tools/vf-component-library/src/site/_data/siteConfig.js, this is needed only for development
  3. 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

4. Post-release

  1. commit and push changes to the develop branch
    • commit message in a format of: Component release 20211130-01
  2. 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
  3. push the tag
    • git push origin --tags
  4. add release notes to the tag and link to the new blog post

Appendix of useful Lerna commands

  • lerna ls list all packages known to lerna
  • lerna ls --since af04cb2a list all changed packages since a commit (sadly not combinable with lerna publish)
  • lerna diff all changes since last publish
  • lerna changed all packages changed