File tree Expand file tree Collapse file tree
eng/common/pipelines/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 Write-Host "##vso[task.setvariable variable=TagName]$tag"
6868 Write-Host "Publishing packages with tag: $tag"
6969 displayName: 'Packages to be published'
70-
71- - template : /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml
72- parameters :
73- npmrcPath : $(ArtifactPath)/.npmrc
74- registryUrl : ${{ parameters.Registry }}
75- CustomCondition : and(succeeded(), ne(variables['SkipPublishing'], 'true'))
7670
7771 - ${{ if eq(parameters.Registry, 'https://registry.npmjs.org/') }} :
7872
@@ -119,6 +113,13 @@ jobs:
119113 condition: and(succeeded(), ne(variables['SkipPublishing'], 'true'))
120114
121115 - ${{ else }} :
116+
117+ - template : /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml
118+ parameters :
119+ npmrcPath : $(ArtifactPath)/.npmrc
120+ registryUrl : ${{ parameters.Registry }}
121+ CustomCondition : and(succeeded(), ne(variables['SkipPublishing'], 'true'))
122+
122123 - pwsh : |
123124 foreach ($package in (dir $(ArtifactPath) *.tgz -Recurse)) {
124125 Write-Host "npm publish $package --verbose --access public --tag $(TagName) --registry ${{ parameters.Registry }}"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ parameters:
77 WorkingDirectory : ' '
88 ScriptDirectory : eng/common/scripts
99 NpmConfigUserConfig : ' '
10+ NpmConfigRegistry : ' '
1011
1112steps :
1213- task : PowerShell@2
2627 GH_TOKEN : $(azuresdk-github-pat)
2728 ${{ if ne(parameters.NpmConfigUserConfig, '') }} :
2829 NPM_CONFIG_USERCONFIG : ${{ parameters.NpmConfigUserConfig }}
30+ ${{ if ne(parameters.NpmConfigRegistry, '') }} :
31+ NPM_CONFIG_REGISTRY : ${{ parameters.NpmConfigRegistry }}
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ parameters:
3232 - name : NpmConfigUserConfig
3333 type : string
3434 default : ' '
35+ - name : NpmConfigRegistry
36+ type : string
37+ default : ' '
3538steps :
3639 - ${{ if eq(length(parameters.PackageInfoLocations), 0) }} :
3740 - pwsh : |
@@ -97,6 +100,8 @@ steps:
97100 env:
98101 ${{ if ne(parameters.NpmConfigUserConfig, '') }}:
99102 NPM_CONFIG_USERCONFIG: ${{ parameters.NpmConfigUserConfig }}
103+ ${{ if ne(parameters.NpmConfigRegistry, '') }}:
104+ NPM_CONFIG_REGISTRY: ${{ parameters.NpmConfigRegistry }}
100105
101106 - template : /eng/common/pipelines/templates/steps/git-push-changes.yml
102107 parameters :
You can’t perform that action at this time.
0 commit comments