Skip to content

Commit

Permalink
save token in npmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
OrbintSoft committed Aug 14, 2022
1 parent 398ca24 commit d1fcd95
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dist
tests/TEST-RESULT.xml
oseventlistener*.tgz
mochawesome-report
report-results
report-results
.npmrc
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ tests
azure-pipelines.yml
mime.types
oseventlistener*.tgz
launch.json
launch.json
.npmrc
2 changes: 1 addition & 1 deletion gulpfile.js/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function publish() {
}
if (deployedVersion.prerelease[0] === 'rc' || currentVersion.prerelease[0] === 'rc') {
const npmToken = process.env.NPM_TOKEN;
await executeProcess('npm', [ 'config', 'set', `//registry.npmjs.org/:_authToken=${npmToken}`] );
await fse.writeFile('.npmrc', `//registry.npmjs.org/:_authToken=${npmToken}`);
await executeProcess('npm', [ 'pack' ]);
await executeProcess('npm', [ 'publish' ]);
} else {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@typescript-eslint/parser": "^5.33.0",
"chai": "^4.3.6",
"coveralls": "^3.1.1",
"eslint": "^8.21.0",
"eslint": "^8.22.0",
"eslint-plugin-jsdoc": "^39.3.6",
"fs-extra": "^10.1.0",
"glob-promise": "^5.0.0",
Expand All @@ -61,7 +61,7 @@
"mochawesome": "^7.1.3",
"nyc": "^15.1.0",
"package-info": "^4.1.4",
"rollup": "^2.77.3",
"rollup": "^2.78.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"semver": "^7.3.7",
"terser": "^5.14.2",
Expand Down

0 comments on commit d1fcd95

Please sign in to comment.