File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,13 @@ function doPublish() {
60
60
exec ( 'git checkout ReactAndroid/gradle.properties' ) ;
61
61
62
62
// 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 ) ;
64
67
65
68
exec ( `npm publish` ) ;
69
+ exec ( `del ${ npmrcPath } ` ) ;
66
70
exec ( `git tag v${ releaseVersion } ` ) ;
67
71
exec ( `git push origin HEAD:${ tempPublishBranch } --follow-tags --verbose` ) ;
68
72
exec ( `git checkout ${ publishBranchName } ` ) ;
Original file line number Diff line number Diff line change @@ -69,14 +69,13 @@ jobs:
69
69
displayName : ' npm auth'
70
70
inputs :
71
71
filename : npm
72
- arguments : ' config set //office.pkgs.visualstudio.com/_packaging/Office/npm /:_authToken $(npmTokenOffice)'
72
+ arguments : ' config set $(publishnpmfeed) /:_authToken $(npmTokenOffice)'
73
73
74
74
- task : CmdLine@2
75
75
displayName : Do Publish
76
76
inputs :
77
77
script : node .ado/publish.js
78
78
79
-
80
79
- task : CmdLine@1
81
80
displayName : ' npm unauth'
82
81
inputs :
You can’t perform that action at this time.
0 commit comments