Skip to content

Commit 05b714f

Browse files
authored
Add special npmrc write/delete in local directory for msal-angular (#6361)
This PR: - Fixes an issue with the release pipeline where npm can't find the auth token in the root of the repo since the msal-angular deploy step has the --workspaces=false flag on by creating the npmrc directly in the msal-angular subdirectory
1 parent 020856e commit 05b714f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.pipelines/custom-templates/publish-template.yml

+15
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ jobs:
6969
# Write NPM authToken
7070
- bash: echo $NPM_TOKEN > .npmrc
7171
displayName: Write npm authToken
72+
condition: not(eq('${{ parameters.libName }}', 'msal-angular'))
73+
env:
74+
NPM_TOKEN: $(MSALJSNPMTOKEN)
75+
# Write NPM authToken (Angular only)
76+
- bash: echo $NPM_TOKEN > .npmrc
77+
displayName: Write npm authToken
78+
workingDirectory: "${{ parameters.path }}/${{ parameters.libName }}"
79+
condition: eq('${{ parameters.libName }}', 'msal-angular')
7280
env:
7381
NPM_TOKEN: $(MSALJSNPMTOKEN)
7482

@@ -109,8 +117,15 @@ jobs:
109117
# Remove .npmrc file
110118
- task: DeleteFiles@1
111119
displayName: Remove .npmrc file
120+
condition: not(eq('${{ parameters.libName }}', 'msal-angular'))
112121
inputs:
113122
Contents: /.npmrc
123+
# Remove .npmrc file (Angular only)
124+
- task: DeleteFiles@1
125+
displayName: Remove .npmrc file
126+
condition: eq('${{ parameters.libName }}', 'msal-angular')
127+
inputs:
128+
Contents: ${{ parameters.path }}/${{ parameters.libName }}/.npmrc
114129

115130
# Install Release Scripts dependencies
116131
- task: Npm@1

0 commit comments

Comments
 (0)