@@ -53,13 +53,21 @@ jobs:
5353 npm publish --access public
5454
5555 # Publish to GitHub Packages
56+ - name : Setup Node.js for GitHub Packages
57+ if : startsWith(github.ref, 'refs/tags/replayer-adapter-nodejs-v')
58+ uses : actions/setup-node@v4
59+ with :
60+ node-version : ' 18'
61+ registry-url : ' https://npm.pkg.github.com'
62+ scope : ' @phuongdnguyen'
63+
5664 - name : Publish to GitHub Packages
5765 if : startsWith(github.ref, 'refs/tags/replayer-adapter-nodejs-v')
5866 run : |
5967 cd replayer-adapter-nodejs
60- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
61- echo "@phuongdnguyen:registry=https://npm.pkg.github.com" >> .npmrc
6268 npm publish
69+ env :
70+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6371
6472 # Manual publish to both registries
6573 - name : Manual publish to NPM Registry
@@ -72,16 +80,24 @@ jobs:
7280 fi
7381 npm publish --access public
7482
83+ - name : Setup Node.js for GitHub Packages (Manual)
84+ if : github.event_name == 'workflow_dispatch'
85+ uses : actions/setup-node@v4
86+ with :
87+ node-version : ' 18'
88+ registry-url : ' https://npm.pkg.github.com'
89+ scope : ' @phuongdnguyen'
90+
7591 - name : Manual publish to GitHub Packages
7692 if : github.event_name == 'workflow_dispatch'
7793 run : |
7894 cd replayer-adapter-nodejs
79- echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
80- echo "@phuongdnguyen:registry=https://npm.pkg.github.com" >> .npmrc
8195 if [ -n "${{ github.event.inputs.version }}" ]; then
8296 npm version ${{ github.event.inputs.version }} --no-git-tag-version
8397 fi
8498 npm publish
99+ env :
100+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
85101
86102 - name : Create GitHub Release
87103 if : startsWith(github.ref, 'refs/tags/replayer-adapter-nodejs-v')
0 commit comments