Skip to content

Commit 19c0979

Browse files
committed
Move to npm public package
1 parent 118b7a7 commit 19c0979

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish package to GitHub Packages
1+
name: Publish package to NPM
22
on:
33
release:
44
types: [published]
@@ -10,14 +10,14 @@ jobs:
1010
packages: write
1111
steps:
1212
- uses: actions/checkout@v3
13-
# Setup .npmrc file to publish to GitHub Packages
13+
# Setup .npmrc file to publish to NPM
1414
- uses: actions/setup-node@v3
1515
with:
1616
node-version: "16.x"
17-
registry-url: "https://npm.pkg.github.com"
17+
registry-url: 'https://registry.npmjs.org'
1818
- run: npm ci
1919
- run: npm run proto
2020
- run: npm run build
21-
- run: npm publish --tag latest
21+
- run: npm publish --tag latest --access public
2222
env:
23-
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ matrix.node-version }}
25+
registry-url: 'https://registry.npmjs.org'
2526
- run: npm ci
2627
- run: npm run proto
2728
- run: npm run verify
@@ -36,7 +37,7 @@ jobs:
3637
- name: Publish snapshot
3738
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3839
env:
39-
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4041
run: |
4142
# We're using 0.0.0 to avoid this version to be higher than released versions.
4243
# To use it:
@@ -45,7 +46,7 @@ jobs:
4546
# We use dist-tag dev for the snapshot releases, see https://docs.npmjs.com/cli/v9/commands/npm-dist-tag for more info
4647
# A snapshot MUST not be published with latest tag (omitting --tag defaults to latest) to avoid users to install snapshot releases
4748
# when using npm install
48-
npm publish --tag dev
49+
npm publish --tag dev --access public
4950
5051
e2e:
5152
permissions:

.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
},
2323
"publishConfig": {
24-
"@restatedev:registry": "https://npm.pkg.github.com"
24+
"@restatedev:registry": "https://registry.npmjs.org"
2525
},
2626
"type": "commonjs",
2727
"main": "dist/public_api.js",
@@ -63,5 +63,13 @@
6363
"ts-node-dev": "^2.0.0",
6464
"typescript": "^4.9.5",
6565
"express": "*"
66+
},
67+
"bugs": {
68+
"url": "https://github.com/restatedev/sdk-typescript/issues"
69+
},
70+
"homepage": "https://github.com/restatedev/sdk-typescript#readme",
71+
"directories": {
72+
"example": "examples",
73+
"test": "test"
6674
}
6775
}

0 commit comments

Comments
 (0)