@@ -387,17 +387,24 @@ jobs:
387387 publish :
388388 name : Publish
389389 runs-on : ubuntu-latest
390+ environment : npm
390391 needs :
391392 - test-macOS-windows-binding
392393 - test-linux-binding
393394 steps :
394395 - uses : actions/checkout@v4
396+ - uses : webfactory/ssh-agent@v0.9.0
397+ with :
398+ ssh-private-key : |
399+ ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}
400+ ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}
395401 - uses : pnpm/action-setup@v4
396402 with :
397403 version : latest
398404 - uses : actions/setup-node@v4
399405 with :
400406 node-version : 20
407+ registry-url : ' https://registry.npmjs.org'
401408 cache : pnpm
402409 - name : Install dependencies
403410 run : pnpm install
@@ -431,21 +438,20 @@ jobs:
431438 - name : List packages
432439 run : ls -R ./npm
433440 shell : bash
441+ - name : Update npm
442+ run : npm install -g npm@latest
443+ - name : Pack
444+ if : ${{ !contains(github.ref, 'main') }}
445+ run : npm pack
434446 - name : Publish
435447 if : contains(github.ref, 'main')
436448 run : |
437- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
438- npm config set scope "@platformatic"
439- # npm config set provenance true
440449 if git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+";
441450 then
442- npm publish --access public --dry-run
451+ npm publish
443452 elif git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+-\.+";
444453 then
445- npm publish --tag next --access public --dry-run
454+ npm publish
446455 else
447456 echo "Not a release, skipping publish"
448457 fi
449- env :
450- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
451- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments