@@ -171,7 +171,7 @@ jobs:
171
171
RELEASE_COMMENT_ID : ${{ needs.release.outputs.comment-id }}
172
172
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
173
173
run : |
174
- npm exec --offline -- template-oss-release-manager --lockfile=false --publish=false
174
+ npm exec --offline -- template-oss-release-manager --lockfile=false --publish=true
175
175
npm run rp-pull-request --ignore-scripts --if-present
176
176
- name : Commit
177
177
id : commit
@@ -320,41 +320,25 @@ jobs:
320
320
defaults :
321
321
run :
322
322
shell : bash
323
+ permissions :
324
+ deployments : write
323
325
steps :
326
+ - name : Checkout
327
+ uses : actions/checkout@v3
328
+ with :
329
+ ref : ${{ fromJSON(needs.release.outputs.release).tagName }}
324
330
- name : Setup Node
325
331
uses : actions/setup-node@v3
326
332
with :
327
333
node-version : 18.x
328
- - name : Install npm@8
329
- run : npm i --prefer-online --no-fund --no-audit -g npm@8
330
- - name : npm Version
331
- run : npm -v
332
- - name : View in Registry
334
+ - name : Install npm@latest
333
335
run : |
334
- EXIT_CODE=0
335
-
336
- function is_published {
337
- if npm view "$@" --loglevel=error > /dev/null; then
338
- echo 0
339
- else
340
- echo 1
341
- fi
342
- }
343
-
344
- for release in $(echo '${{ needs.release.outputs.releases }}' | jq -r '.[] | @base64'); do
345
- name=$(echo "$release" | base64 --decode | jq -r .pkgName)
346
- version=$(echo "$release" | base64 --decode | jq -r .version)
347
- spec="$name@$version"
348
- status=$(is_published "$spec")
349
- if [[ "$status" -eq 1 ]]; then
350
- echo "$spec ERROR"
351
- EXIT_CODE=$status
352
- else
353
- echo "$spec OK"
354
- fi
355
- done
356
-
357
- exit $EXIT_CODE
336
+ npm i --prefer-online --no-fund --no-audit -g npm@latest
337
+ npm config set '//registry.npmjs.org/:_authToken'=\${PUBLISH_TOKEN}
338
+ - name : Publish
339
+ env :
340
+ PUBLISH_TOKEN : ${{ secrets.PUBLISH_TOKEN }}
341
+ run : npm publish
358
342
359
343
post-release-integration :
360
344
needs : [ release, release-integration ]
0 commit comments