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 2929 echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
3030 }
3131
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+
3237 - name : 🔎 Search for build of ${{ github.ref }}
3338 shell : pwsh
3439 id : findrunid
@@ -107,10 +112,10 @@ jobs:
107112 if : ${{ env.NUGET_API_KEY_DEFINED == 'true' }}
108113
109114 - name : 🚀 Push NPM packages
115+ shell : pwsh
110116 run : |
111- npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}
117+ npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}
112118 Get-ChildItem '${{ runner.temp }}/deployables/*.tgz' |% {
113119 npm publish $_ --registry=https://registry.npmjs.org/
114120 }
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