Skip to content

Commit a072c62

Browse files
committed
docs: add explanation of how to set up a new NPM package in Wombat
1 parent 710c60f commit a072c62

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/process/release.md

+49
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,52 @@ Releases should be done in "reverse semver order", meaning they should follow:
107107
Oldest LTS -> Newest LTS -> Patch -> RC -> Next
108108

109109
This can skip any versions which don't need releases, so most weeks are just "Patch -> Next".
110+
111+
## Releasing a new package
112+
113+
Wombat has some special access requirements which need to be configured to publish a new NPM package.
114+
115+
See [this Wombat doc](http://g3doc/company/teams/cloud-client-libraries/team/automation/docs/npm-publish-service#existing-package)
116+
and [this postmortem](http://docs/document/d/1emx2mhvF5xMzNUlDrVRYKI_u4iUOnVrg3rV6c5jk2is?resourcekey=0-qpsFbBfwioYT4f6kyUm8ZA&tab=t.0)
117+
for more info.
118+
119+
Angular is _not_ an organization on NPM, therefore each package is published
120+
independently and Wombat access needs to be managed individually. This also means
121+
we can't rely on Wombat already having access to a new package.
122+
123+
In order to configure a brand new NPM package, it first needs to be published
124+
manually so we can add Wombat access to it. Note that this step can and should be
125+
done prior to weekly releases. The sooner this can be done, the less likely it
126+
will block the next weekly release.
127+
128+
1. Check out the `main` branch, which should always have a `-next` version.
129+
- This avoids having the initial publish actually be used in production.
130+
1. Trigger a release build locally.
131+
```shell
132+
nvm install
133+
yarn --frozen-lockfile
134+
yarn -s ng-dev release build
135+
```
136+
1. Log in to NPM as `angular`.
137+
```shell
138+
npm login
139+
```
140+
- See these two Valentine entries for authentication details:
141+
- https://valentine.corp.google.com/#/show/1460636514618735
142+
- https://valentine.corp.google.com/#/show/1531867371192103
143+
1. Publish the release.
144+
```shell
145+
(cd dist/releases/my-scope/my-pkg/ && npm publish --access public)
146+
```
147+
1. Add Wombat to the package.
148+
```shell
149+
npm owner add google-wombot @my-scope/my-pkg
150+
```
151+
1. Don't forget to logout.
152+
```shell
153+
npm logout
154+
```
155+
1. File a bug like [b/336626936](http://b/336626936) to ask Wombat maintainers to
156+
accept the invite for the new package.
157+
158+
Once Wombat accepts the invite, regular automated releases should work as expected.

0 commit comments

Comments
 (0)