|
| 1 | +# playground-elements Release Process |
| 2 | + |
| 3 | +This document outlines the process for publishing playground-elements to [npm](https://www.npmjs.com/package/playground-elements). |
| 4 | + |
| 5 | +Prerequisites: |
| 6 | + |
| 7 | +- Must have npm publish permissions for playground-elements. Note: it can take a few hours for the permissions to propagate and allow publishing. |
| 8 | + |
| 9 | +> **Warning** |
| 10 | +> This release process has manual steps. At the ⚠️ emoji, proceed with caution. |
| 11 | +
|
| 12 | +## Steps |
| 13 | + |
| 14 | +1. Manually create a release PR. Prior examples [#264](https://github.com/google/playground-elements/pull/376) [#245](https://github.com/google/playground-elements/pull/245) |
| 15 | + 1. Create a branch from `main`. E.g., `git checkout -b release-vX-XX-X` |
| 16 | + 1. Modify the CHANGELOG.md to reflect the release version |
| 17 | + 1. Run `npm version --no-git-tag-version [patch|minor|major]` to update `package.json` and `package-lock.json` with the correct version bump. This will also automatically run `npm run update-version-module` and stage the `src/shared/version.ts` file. |
| 18 | + 1. Commit and create PR with name “Release <VERSION_NUMBER>” |
| 19 | +1. Get code review & tests passing on PR. Squash and merge once approved. |
| 20 | +1. Checkout the `main` branch and `git pull`. `git status` and `git log` to ensure on `main` and last commit was the release commit. |
| 21 | + |
| 22 | +> **Warning** |
| 23 | +> Manual Publish to NPM - proceed with caution |
| 24 | +
|
| 25 | +1. ⚠️ Running `npm publish` will always replace the `latest` tag with the version just published. The `latest` tag is what users get from `npm install playground-elements`. If publishing a pre-release, use `npm publish --no-tag`. Otherwise for a normal release, use `npm publish`. |
| 26 | +1. Check https://www.npmjs.com/package/playground-elements to validate that the publish succeeded, or run `npm info playground-elements` |
| 27 | +1. Add a [Github Release via this dashboard.](https://github.com/google/playground-elements/releases) |
| 28 | + 1. Press “Draft a new release” |
| 29 | + 1. 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. |
| 30 | + 1. Release title should be identical to the tag. |
| 31 | + 1. In the “describe this release” textbox, copy paste the `CHANGELOG.md` for the release. |
| 32 | + 1. Press “Publish release”. |
| 33 | + |
| 34 | +Great job! You've successfully released playground-elements to npm and tagged the release. |
| 35 | + |
| 36 | +Verification links: |
| 37 | + |
| 38 | +- NPM: https://www.npmjs.com/package/playground-elements |
| 39 | +- Tagged release: https://github.com/google/playground-elements/releases |
0 commit comments