Set NPM_TOKEN in .npmrc when publishing (#9735) [skip ci]
* Set NPM_TOKEN in .npmrc when publishing [skip ci] * Update .github/main.workflow
This commit is contained in:
parent
adb4701e00
commit
d610289812
2
.github/main.workflow
vendored
2
.github/main.workflow
vendored
@ -17,7 +17,7 @@ action "Publish to npm" {
|
||||
uses = "docker://node:10"
|
||||
secrets = ["NPM_TOKEN"]
|
||||
runs = "make"
|
||||
args = "publish"
|
||||
args = "publish-ci"
|
||||
env = {
|
||||
CI = "true"
|
||||
}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
.npmrc
|
||||
|
||||
.DS_Store
|
||||
/node_modules
|
||||
/.github/actions/*/node_modules
|
||||
|
||||
12
Makefile
12
Makefile
@ -64,6 +64,7 @@ fix-json:
|
||||
./node_modules/.bin/prettier "{packages,codemod}/*/test/fixtures/**/options.json" --write --loglevel warn
|
||||
|
||||
clean: test-clean
|
||||
rm -f .npmrc
|
||||
rm -rf packages/babel-polyfill/browser*
|
||||
rm -rf packages/babel-polyfill/dist
|
||||
rm -rf coverage
|
||||
@ -140,6 +141,17 @@ publish: prepublish
|
||||
./node_modules/.bin/lerna publish from-git --require-scripts
|
||||
make clean
|
||||
|
||||
publish-ci: prepublish
|
||||
ifneq ("$(NPM_TOKEN)", "")
|
||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||
else
|
||||
echo "Missing NPM_TOKEN env var"
|
||||
exit 1
|
||||
endif
|
||||
./node_modules/.bin/lerna publish from-git --require-scripts --yes
|
||||
rm -f .npmrc
|
||||
make clean
|
||||
|
||||
bootstrap-only: clean-all
|
||||
yarn --ignore-engines
|
||||
./node_modules/.bin/lerna bootstrap -- --ignore-engines
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user