Users with permissions in the @spectrum-web-components
organization on NPM can follow the following steps to create and publish a new version.
- Merge all pull requests to be included in the release and wait for the
main
branch to show that it has completed the required CI jobs. git checkout main && git fetch && git pull && git clean -dfX
- Run
nvm use
assumes a Node Version Manager install, and confirm your on an operable version of Node. yarn install
npm whoami
ensure that you are logged in with the user account for the public NPM registryyarn lerna-publish
- Scan the version summary for any unexpected changes.
- Changes to the major versions number are likely to point to undesired version numbers.
- Changes to the minor or feature version number should be confirmed as correct against the changes that have been made since the last release.
Y
to confirm.- Enter one time password for npm.
- After the SWC packages are released, the React Wrapper packages will be generated. This multi-phase approach ensure that the wrapped packages share the same version as the standard packages.
- Scan the version summary for any unexpected changes.
- The versions should be the same as those that just we applied to their matched SWC packages.
- Changes to the major versions number are likely to point to undesired version numbers.
- Changes to the minor or feature version number should be confirmed as correct against the changes that have been made since the last release.
Y
to confirm.- Enter a new one time password for npm.
The docs site will publish automatically if the #publish
string is included in the commit message and the check suite runs successfully.
If publishing fails with an error, check the list of tags to see if new tags have been released for your publishing attempt. If they have, then yarn lerna-publish
will no longer work. Instead, you'll need to run:
yarn lerna-publish from-package
Navigate to SWC's Actions and click the Build & publish site
link under the Workflows heading.
At the top of the table you will see a Run workflow
dropdown; click that and run it from the main
branch.
Running manual workflows, GitHub documentation
If you have the GitHub CLI installed, you can alternatively run gh workflow run publish.yml --ref main
from the command line.