Skip to content

Commit 6e6c426

Browse files
author
REDMOND\acoates
committed
fix
1 parent ed26bde commit 6e6c426

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.ado/publish.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ function doPublish() {
6060
exec('git checkout ReactAndroid/gradle.properties');
6161

6262
// Configure npm to publish to internal feed
63-
fs.writeFileSync(path.resolve(__dirname, '../.npmrc'), `registry=${process.env.publishnpmfeed}\nalways-auth=true`);
63+
const npmrcPath = path.resolve(__dirname, '../.npmrc');
64+
const npmrcContents = `registry=https:${process.env.publishnpmfeed}/registry/\nalways-auth=true`;
65+
console.log(`Creating ${npmrcPath} for publishing`);
66+
fs.writeFileSync(npmrcPath, npmrcContents);
6467

6568
exec(`npm publish`);
69+
exec(`del ${npmrcPath}`);
6670
exec(`git tag v${releaseVersion}`);
6771
exec(`git push origin HEAD:${tempPublishBranch} --follow-tags --verbose`);
6872
exec(`git checkout ${publishBranchName}`);

.ado/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ jobs:
6969
displayName: 'npm auth'
7070
inputs:
7171
filename: npm
72-
arguments: 'config set //office.pkgs.visualstudio.com/_packaging/Office/npm/:_authToken $(npmTokenOffice)'
72+
arguments: 'config set $(publishnpmfeed)/:_authToken $(npmTokenOffice)'
7373

7474
- task: CmdLine@2
7575
displayName: Do Publish
7676
inputs:
7777
script: node .ado/publish.js
7878

79-
8079
- task: CmdLine@1
8180
displayName: 'npm unauth'
8281
inputs:

0 commit comments

Comments
 (0)