Skip to content

Commit 3148eb2

Browse files
committed
chore: Explicit use .npmrc for NPM_TOKEN
1 parent 453cda3 commit 3148eb2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

codebuild/release/prod-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,16 @@ phases:
4747
console.log(auth.generate(process.env.OTP_SECRET_KEY)),
4848
auth.timeRemaining() * 1000);
4949
"`
50+
# npm will only expand env vars inside .npmrc
51+
# NOTE the ' this is to keep the env var NPM_TOKEN from expanding!
52+
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
5053
# Now we publish to npm.
5154
# This is going to use the OTP generated above and the NPM_TOKEN
5255
# environment variable. This will only publish things that are
5356
# missing from npm. It is therefore safe to run repeatedly.
5457
- npx lerna publish from-package --yes --otp $OTP
58+
# remove after publishing
59+
- rm .npmrc
5560
# Clear out the verdaccio cache so that we get the latest version
5661
# of everything from public npm
5762
- rm -rf verdaccio/storage/

0 commit comments

Comments
 (0)