This document outlines the process for publishing playground-elements to npm.
Prerequisites:
- Must have npm publish permissions for playground-elements. Note: it can take a few hours for the permissions to propagate and allow publishing.
Warning This release process has manual steps. At the
⚠️ emoji, proceed with caution.
- Manually create a release PR. Prior examples #264 #245
- Create a branch from
main
. E.g.,git checkout -b release-vX-XX-X
- Modify the CHANGELOG.md to reflect the release version
- Run
npm version --no-git-tag-version [patch|minor|major]
to updatepackage.json
andpackage-lock.json
with the correct version bump. This will also automatically runnpm run update-version-module
and stage thesrc/shared/version.ts
file. - Commit and create PR with name “Release <VERSION_NUMBER>”
- Create a branch from
- Get code review & tests passing on PR. Squash and merge once approved.
- Checkout the
main
branch andgit pull
.git status
andgit log
to ensure onmain
and last commit was the release commit.
Warning Manual Publish to NPM - proceed with caution
⚠️ Runningnpm publish
will always replace thelatest
tag with the version just published. Thelatest
tag is what users get fromnpm install playground-elements
. If publishing a pre-release, usenpm publish --no-tag
. Otherwise for a normal release, usenpm publish
.- Check https://www.npmjs.com/package/playground-elements to validate that the publish succeeded, or run
npm info playground-elements
- Add a Github Release via this dashboard.
- Press “Draft a new release”
- Click “Choose a tag” and type in the version that was released. You will create this new tag when publishing the release notes. It will be associated with the latest commit on
main
which is your release. - Release title should be identical to the tag.
- In the “describe this release” textbox, copy paste the
CHANGELOG.md
for the release. - Press “Publish release”.
Great job! You've successfully released playground-elements to npm and tagged the release.
Verification links: