ci: add npm publish workflow and clean up package.json

- Add .github/workflows/publish.yml
- Remove .npmrc and unused sharp config
- Package ready for auto-publishing
This commit is contained in:
CodingInCarhartts
2025-12-14 13:22:40 -08:00
parent c8b21f3c30
commit 7adce83154
3 changed files with 34 additions and 10 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Publish to npm
on:
push:
branches: [main]
paths:
- "src/**"
- "package.json"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Setup npm auth
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
-2
View File
@@ -1,2 +0,0 @@
# Skip optional sharp dependency (not needed for text embeddings)
sharp_ignore_global_libvips=1
+2 -8
View File
@@ -56,12 +56,6 @@
},
"trustedDependencies": [
"@biomejs/biome",
"protobufjs",
"sharp"
],
"bun": {
"install": {
"optional": true
}
}
"protobufjs"
]
}