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