@@ -169,7 +169,7 @@ jobs:
169
169
RELEASE_COMMENT_ID : ${{ needs.release.outputs.comment-id }}
170
170
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
171
171
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
173
173
npm run rp-pull-request --ignore-scripts --if-present
174
174
- name : Commit
175
175
id : commit
@@ -318,41 +318,26 @@ jobs:
318
318
defaults :
319
319
run :
320
320
shell : bash
321
+ permissions :
322
+ deployments : write
323
+ id-token : write
321
324
steps :
325
+ - name : Checkout
326
+ uses : actions/checkout@v3
327
+ with :
328
+ ref : ${{ fromJSON(needs.release.outputs.release).tagName }}
322
329
- name : Setup Node
323
330
uses : actions/setup-node@v3
324
331
with :
325
332
node-version : 18.x
326
333
- 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
331
334
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
356
341
357
342
post-release-integration :
358
343
needs : [ release, release-integration ]
0 commit comments