@@ -387,17 +387,26 @@ jobs:
387387 publish :
388388 name : Publish
389389 runs-on : ubuntu-latest
390+ environment : npm
391+ # if: ${{ contains(github.ref, 'main') }}
390392 needs :
391- - test-macOS-windows-binding
392- - test-linux-binding
393+ - build
394+ # - test-macOS-windows-binding
395+ # - test-linux-binding
393396 steps :
394397 - uses : actions/checkout@v4
398+ - uses : webfactory/ssh-agent@v0.9.0
399+ with :
400+ ssh-private-key : |
401+ ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}
402+ ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}
395403 - uses : pnpm/action-setup@v4
396404 with :
397405 version : latest
398406 - uses : actions/setup-node@v4
399407 with :
400408 node-version : 20
409+ registry-url : ' https://registry.npmjs.org'
401410 cache : pnpm
402411 - name : Install dependencies
403412 run : pnpm install
@@ -432,20 +441,23 @@ jobs:
432441 run : ls -R ./npm
433442 shell : bash
434443 - name : Publish
435- if : contains(github.ref, 'main')
436- run : |
437- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
438- npm config set scope "@platformatic"
439- # npm config set provenance true
440- if git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+";
441- then
442- npm publish --access public --dry-run
443- elif git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+-\.+";
444- then
445- npm publish --tag next --access public --dry-run
446- else
447- echo "Not a release, skipping publish"
448- fi
444+ run : npm publish --dry-run
449445 env :
450446 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
451447 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
448+ # - name: Publish
449+ # if: contains(github.ref, 'main')
450+ # run: |
451+ # npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
452+ # if git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+";
453+ # then
454+ # npm publish
455+ # elif git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+-\.+";
456+ # then
457+ # npm publish
458+ # else
459+ # echo "Not a release, skipping publish"
460+ # fi
461+ # env:
462+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
463+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments