@@ -182,7 +182,7 @@ jobs:
182182 RELEASE_COMMENT_ID : ${{ needs.release.outputs.comment-id }}
183183 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
184184 run : |
185- npm exec --offline -- template-oss-release-manager --lockfile=false --publish=false
185+ npm exec --offline -- template-oss-release-manager --lockfile=false --publish=true
186186 npm run rp-pull-request --ignore-scripts --if-present
187187 - name : Commit
188188 id : commit
@@ -331,40 +331,26 @@ jobs:
331331 defaults :
332332 run :
333333 shell : bash
334+ permissions :
335+ deployments : write
336+ id-token : write
334337 steps :
338+ - name : Checkout
339+ uses : actions/checkout@v3
340+ with :
341+ ref : ${{ fromJSON(needs.release.outputs.release).tagName }}
335342 - name : Setup Node
336343 uses : actions/setup-node@v3
337- id : node
338344 with :
339- node-version : 20.x
340- check-latest : contains('20.x', '.x')
341-
342- - name : View in Registry
345+ node-version : 18.x
346+ - name : Install npm@latest
343347 run : |
344- EXIT_CODE=0
345-
346- function is_published {
347- if npm view "$@" --loglevel=error > /dev/null; then
348- echo 0
349- else
350- echo 1
351- fi
352- }
353-
354- for release in $(echo '${{ needs.release.outputs.releases }}' | jq -r '.[] | @base64'); do
355- name=$(echo "$release" | base64 --decode | jq -r .pkgName)
356- version=$(echo "$release" | base64 --decode | jq -r .version)
357- spec="$name@$version"
358- status=$(is_published "$spec")
359- if [[ "$status" -eq 1 ]]; then
360- echo "$spec ERROR"
361- EXIT_CODE=$status
362- else
363- echo "$spec OK"
364- fi
365- done
366-
367- exit $EXIT_CODE
348+ npm i --prefer-online --no-fund --no-audit -g npm@latest
349+ npm config set '//registry.npmjs.org/:_authToken'=\${PUBLISH_TOKEN}
350+ - name : Publish
351+ env :
352+ PUBLISH_TOKEN : ${{ secrets.PUBLISH_TOKEN }}
353+ run : npm publish --provenance --tag=next-5
368354
369355 post-release-integration :
370356 needs : [ release, release-integration ]
0 commit comments