Skip to content

Commit 54c2af9

Browse files
committed
publish replayer js to github
1 parent fc6e7a5 commit 54c2af9

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/publish-npm-package.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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')

replayer-adapter-nodejs/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"name": "@phuongdnguyen/replayer-adapter-nodejs",
3-
"version": "1.0.0",
3+
"version": "1.0.3",
44
"description": "Replayer adapter and interceptors for Temporal Node.js workflows",
5-
"publishConfig": {
6-
"registry": "https://npm.pkg.github.com"
7-
},
85
"repository": {
96
"type": "git",
107
"url": "git+https://github.com/phuongdnguyen/temporal-workflow-replay-debugger.git",

0 commit comments

Comments
 (0)