File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 29
29
echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
30
30
}
31
31
32
+ if ('${{ secrets.NPM_API_KEY }}') {
33
+ Write-Host "NPM_API_KEY secret detected. NPM packages will be pushed."
34
+ echo "NPM_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
35
+ }
36
+
32
37
- name : 🔎 Search for build of ${{ github.ref }}
33
38
shell : pwsh
34
39
id : findrunid
@@ -107,10 +112,10 @@ jobs:
107
112
if : ${{ env.NUGET_API_KEY_DEFINED == 'true' }}
108
113
109
114
- name : 🚀 Push NPM packages
115
+ shell : pwsh
110
116
run : |
111
- npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}
117
+ npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}
112
118
Get-ChildItem '${{ runner.temp }}/deployables/*.tgz' |% {
113
119
npm publish $_ --registry=https://registry.npmjs.org/
114
120
}
115
- env :
116
- NPM_AUTH_TOKEN : ${{ secrets.NPM_API_KEY }}
121
+ if : ${{ env.NPM_API_KEY_DEFINED == 'true' }}
You can’t perform that action at this time.
0 commit comments