From 7adce83154ae7621dc19c536db307babba287125 Mon Sep 17 00:00:00 2001 From: CodingInCarhartts Date: Sun, 14 Dec 2025 13:22:40 -0800 Subject: [PATCH] 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 --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ .npmrc | 2 -- package.json | 10 ++-------- 3 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/publish.yml delete mode 100644 .npmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f929079 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 32dbc9d..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# Skip optional sharp dependency (not needed for text embeddings) -sharp_ignore_global_libvips=1 diff --git a/package.json b/package.json index 5c939f9..b888ace 100644 --- a/package.json +++ b/package.json @@ -56,12 +56,6 @@ }, "trustedDependencies": [ "@biomejs/biome", - "protobufjs", - "sharp" - ], - "bun": { - "install": { - "optional": true - } - } + "protobufjs" + ] }