This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Releasing OpenCensus Node Packages (for Maintainers Only) | ||
|
||
This document explains how to publish all OC Node modules at version x.y.z. Ensure that you’re following semver when choosing a version number. | ||
|
||
## Update to latest locally | ||
|
||
Use `git fetch` and `git checkout origin/master` to ensure you’re on the latest commit. Make sure | ||
you have no unstaged changes. Ideally, also use `git clean -dfx` to remove all ignored and | ||
untracked files. | ||
|
||
## Create a new branch | ||
|
||
Create a new branch called `x.y.z-proposal` from the current commit. | ||
|
||
## Use Lerna to prepare each package for release | ||
|
||
Use `npm install` and `lerna bootstrap` to initialize all package directories. | ||
Also, use `lerna publish --skip-npm --skip-git` to bump version numbers. | ||
Ensure that the version being bumped to is `x.y.z`. This should create some unstaged changes. | ||
|
||
## Create a new commit | ||
|
||
Create a new commit with the exact title: `chore(multiple): x.y.z release proposal`. | ||
|
||
## Use the Changelog to create a GitHub Release | ||
|
||
On [GitHub Releases](https://github.com/census-instrumentation/opencensus-node/releases), | ||
follow the example set by recent releases to populate a summary of changes, as well as a list of | ||
commits that were applied since the last release. `git log --oneline --no-decorate` is a good way | ||
to get that list of commits. Save it as a draft, don’t publish it. Don’t forget the tag -- call | ||
it `vx.y.z` and leave it pointing at `master` for now (this can be changed as long as the GitHub | ||
release isn’t published). | ||
|
||
## Create a new PR | ||
|
||
Push the branch to GitHub and create a new PR with that exact name. The commit body should just | ||
be a link to the *draft* notes. Someone who can access draft notes should approve it, looking | ||
in particular for test passing, and whether the draft notes are satisfactory. | ||
|
||
## Merge and pull | ||
|
||
Merge the PR, and pull the changes locally (using the commands in the first step). Ensure that | ||
`chore(multiple): x.y.z release proposal` is the most recent commit. | ||
|
||
## Publish all packages | ||
|
||
Go into each directory and use `npm publish` to publish the package. You can use the following | ||
script to automate this. | ||
|
||
```bash | ||
#!/bin/bash | ||
|
||
for dir in $(ls packages); do | ||
pushd packages/$dir | ||
npm publish | ||
popd | ||
done | ||
``` | ||
|
||
Check your e-mail and make sure the number of “you’ve published this module” emails matches the number you expect. | ||
|
||
## Publish the GitHub Release | ||
|
||
Publish the GitHub release, ensuring that the tag points to the newly landed commit corresponding to release proposal `x.y.z`. |