Skip to content

Commit

Permalink
Move to npm public package
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Oct 25, 2023
1 parent 118b7a7 commit ccb192c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish package to GitHub Packages
name: Publish package to NPM
on:
release:
types: [published]
Expand All @@ -14,10 +14,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://npm.pkg.github.com"
- run: npm ci
- run: npm run proto
- run: npm run build
- run: npm publish --tag latest
- run: npm publish --tag latest --access public
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Publish snapshot
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# We're using 0.0.0 to avoid this version to be higher than released versions.
# To use it:
Expand All @@ -45,7 +45,7 @@ jobs:
# We use dist-tag dev for the snapshot releases, see https://docs.npmjs.com/cli/v9/commands/npm-dist-tag for more info
# A snapshot MUST not be published with latest tag (omitting --tag defaults to latest) to avoid users to install snapshot releases
# when using npm install
npm publish --tag dev
npm publish --tag dev --access public
e2e:
permissions:
Expand Down
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"publishConfig": {
"@restatedev:registry": "https://npm.pkg.github.com"
"@restatedev:registry": "https://registry.npmjs.org"
},
"type": "commonjs",
"main": "dist/public_api.js",
Expand Down Expand Up @@ -63,5 +63,13 @@
"ts-node-dev": "^2.0.0",
"typescript": "^4.9.5",
"express": "*"
},
"bugs": {
"url": "https://github.com/restatedev/sdk-typescript/issues"
},
"homepage": "https://github.com/restatedev/sdk-typescript#readme",
"directories": {
"example": "examples",
"test": "test"
}
}

0 comments on commit ccb192c

Please sign in to comment.