Skip to content

Commit 0ad90e7

Browse files
mayurkale22dyladan
andauthored
Release process (#661)
* chore: update RELEASING.md * chore: update RELEASING.md * chore: add known issue Co-authored-by: Daniel Dyla <[email protected]>
1 parent 8496fb2 commit 0ad90e7

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

RELEASING.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,42 @@
22

33
This document explains how to publish all OT modules at version x.y.z. Ensure that you’re following semver when choosing a version number.
44

5+
Release Process:
6+
7+
* [Update to latest locally](#update-to-latest-locally)
8+
* [Create a new branch](#create-a-new-branch)
9+
* [Prepare each package for release](#prepare-each-package-for-release)
10+
* [Use the Changelog to create a GitHub Release](#use-the-changelog-to-create-a-github-release)
11+
* [Create a new PR](#create-a-new-pr)
12+
* [Merge and pull](#merge-and-pull)
13+
* [Publish all packages](#publish-all-packages)
14+
* [Publish the GitHub Release](#publish-the-github-release)
15+
* [Update CHANGELOG](#update-changelog)
16+
17+
## Update to latest locally
18+
19+
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.
20+
21+
## Create a new branch
22+
23+
Create a new branch called `x.y.z-proposal` from the current commit.
24+
25+
## Prepare each package for release
26+
27+
Decide on the next `major.minor.patch` release number based on [semver](http://semver.org/) guidelines.
28+
29+
* Use `npm install` command to initialize all package directories
30+
* Use `lerna publish --skip-npm --no-git-tag-version --no-push` to bump the version in all `package.json`
31+
* Use `npm run bootstrap` to generate latest `version.ts` files
32+
533
## Use the Changelog to create a GitHub Release
634

735
### Generate the changelog with lerna
836

937
Since we use `lerna`, we can use [lerna-changelog](https://github.com/lerna/lerna-changelog#lerna-changelog)
1038

1139
#### How to use
12-
Pass your [github token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to generate the changelog automatically.
40+
Pass your [github token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to generate the changelog automatically.
1341
For security reasons, when you create a Github token, select the permissions: under **repo**, select **Access public repositories**, **commit status**.
1442

1543
In your terminal, execute the following command:
@@ -41,3 +69,43 @@ GITHUB_AUTH=xxxxx lerna-changelog --from=v1.0.0 --to=v2.0.0
4169
#### Update Changelog file
4270

4371
From what `lerna-changelog` has generated, starts new Unreleased label. Follow the example set by recent Released label.
72+
73+
On [GitHub Releases](https://github.com/open-telemetry/opentelemetry-js/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. 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).
74+
75+
## Create a new PR
76+
77+
Create a pull request titled `chore: x.y.z release proposal`. 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.
78+
79+
## Merge and pull
80+
81+
Merge the PR, and pull the changes locally (using the commands in the first step). Ensure that `chore: x.y.z release proposal` is the most recent commit.
82+
83+
## Publish all packages
84+
85+
Go into each directory and use `npm publish` (requires permissions) to publish the package. You can use the following script to automate this.
86+
87+
```bash
88+
#!/bin/bash
89+
90+
for dir in $(ls packages); do
91+
pushd packages/$dir
92+
npm publish
93+
popd
94+
done
95+
```
96+
97+
Check your e-mail and make sure the number of “you’ve published this module” emails matches the number you expect.
98+
99+
## Publish the GitHub Release
100+
Publish the GitHub release, ensuring that the tag points to the newly landed commit corresponding to release proposal `x.y.z`.
101+
102+
## Update CHANGELOG
103+
104+
* After releasing is done, update the [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-js/blob/master/CHANGELOG.md) and start new Unreleased label.
105+
* Create a new commit with the exact title: `Post Release: update CHANGELOG.md`.
106+
* Go through PR review and merge it to GitHub master branch.
107+
108+
109+
## Known Issues
110+
111+
* The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`.

0 commit comments

Comments
 (0)