Skip to content

chore: Explicit use .npmrc for NPM_TOKEN #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions codebuild/release/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ phases:
console.log(auth.generate(process.env.OTP_SECRET_KEY)),
auth.timeRemaining() * 1000);
"`
# npm will only expand env vars inside .npmrc
# NOTE the ' this is to keep the env var NPM_TOKEN from expanding!
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
# Now we publish to npm.
# This is going to use the OTP generated above and the NPM_TOKEN
# environment variable. This will only publish things that are
# missing from npm. It is therefore safe to run repeatedly.
- npx lerna publish from-package --yes --otp $OTP
# remove after publishing
- rm .npmrc
# Clear out the verdaccio cache so that we get the latest version
# of everything from public npm
- rm -rf verdaccio/storage/
Expand Down