Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from dominykas/npm-otp-env
Browse files Browse the repository at this point in the history
Build: set NPM_CONFIG_OTP directly before npx semantic-release
  • Loading branch information
dominykas committed Aug 24, 2019
2 parents 894f714 + c29364b commit 5c06a7b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
18 changes: 1 addition & 17 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
'use strict';

const path = require('path');

const npmrcPath = process.env.NPM_CONFIG_USERCONFIG || path.resolve(process.cwd(), '.npmrc');

module.exports = {
npmPublish: true,
tarballDir: '.',
assets: 'allow-scripts-*.tgz',
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/npm',
[
'@semantic-release/exec',
{
prepareCmd: `echo -e "\notp=$(curl -s $NPM_OTP_URL)" >>${npmrcPath}`
}
],
'@semantic-release/github'
]
assets: 'allow-scripts-*.tgz'
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
provider: "script"
skip_cleanup: true
script:
- "npx semantic-release"
- "NPM_CONFIG_OTP=$(curl -s $NPM_OTP_URL) npx semantic-release"
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@commitlint/config-conventional": "8.x.x",
"@hapi/code": "6.x.x",
"@hapi/lab": "20.x.x",
"@semantic-release/exec": "3.x.x",
"mkdirp": "0.5.x",
"rimraf": "3.x.x",
"semantic-release": "15.x.x",
Expand Down

0 comments on commit 5c06a7b

Please sign in to comment.