Skip to content

Commit f8bb9df

Browse files
authored
chore: publish npm package to npmjs.org instead of GitHub Packages (#4)
Switch from GitHub Packages (npm.pkg.github.com) to the public npm registry (registry.npmjs.org) so users can install without configuring a custom registry. - Update publishConfig in package.json to npmjs.org with public access - Update publish workflow to use registry.npmjs.org and NPM_TOKEN secret - Remove GitHub Packages registry config from README install instructions - Update RELEASING docs to reflect new publish target Requires NPM_TOKEN repository secret with npmjs.org publish permissions. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 308d9f5 commit f8bb9df

4 files changed

Lines changed: 8 additions & 13 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
# Build and publish npm package (after tests pass)
6363
publish-npm:
64-
name: Publish to GitHub Packages (npm)
64+
name: Publish to npmjs.org
6565
needs: [test]
6666
runs-on: ubuntu-latest
6767
steps:
@@ -70,7 +70,7 @@ jobs:
7070
- uses: actions/setup-node@v6
7171
with:
7272
node-version: "22"
73-
registry-url: "https://npm.pkg.github.com"
73+
registry-url: "https://registry.npmjs.org"
7474

7575
- uses: hyperlight-dev/ci-setup-workflow@v1.8.0
7676
with:
@@ -92,10 +92,10 @@ jobs:
9292
if: github.event_name == 'workflow_dispatch'
9393
run: npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
9494

95-
- name: Publish to GitHub Packages
96-
run: npm publish
95+
- name: Publish to npmjs.org
96+
run: npm publish --access public
9797
env:
98-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9999

100100
# Build and publish Docker image (after tests pass)
101101
publish-docker:

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ docker run -it --rm `
109109
### Option 2: npm package
110110

111111
```bash
112-
# Configure npm for GitHub Packages
113-
npm config set @hyperlight-dev:registry https://npm.pkg.github.com
114-
115112
# Install globally
116113
npm install -g @hyperlight-dev/hyperagent
117114

docs/RELEASING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ git push origin v0.1.1
5050
The [publish workflow](../.github/workflows/publish.yml) automatically:
5151

5252
1. Runs tests on all hypervisors (KVM, MSHV, WHP)
53-
2. Publishes npm package to GitHub Packages (`@hyperlight-dev/hyperagent`)
53+
2. Publishes npm package to [npmjs.org](https://www.npmjs.com/package/@hyperlight-dev/hyperagent)
5454
3. Publishes Docker image to GitHub Container Registry (`ghcr.io/hyperlight-dev/hyperagent`)
5555

5656
## Manual Release (workflow_dispatch)
@@ -66,9 +66,6 @@ For testing or hotfixes without creating a git tag:
6666
### npm package
6767

6868
```bash
69-
# Configure npm for GitHub Packages
70-
npm config set @hyperlight-dev:registry https://npm.pkg.github.com
71-
7269
# Install specific version
7370
npm install @hyperlight-dev/hyperagent@0.1.0
7471

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"dist/"
1212
],
1313
"publishConfig": {
14-
"registry": "https://npm.pkg.github.com"
14+
"registry": "https://registry.npmjs.org",
15+
"access": "public"
1516
},
1617
"repository": {
1718
"type": "git",

0 commit comments

Comments
 (0)