From ae365d5736fc77225bc099707b09113360e5eeb0 Mon Sep 17 00:00:00 2001 From: "Nadhi-(Kushi)" Date: Sun, 29 Mar 2026 14:32:19 +0530 Subject: [PATCH 1/2] chore: added ci to public the packge --- .github/workflows/publish.yml | 60 +++++++++++++++++++++++++++++++++++ package.json | 6 ++-- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5b01a44 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,60 @@ +name: Publish to npm + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies + run: bun install + + - name: Build + run: bun run build + + - name: Test + run: bun test + + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Setup Node.js (for npm publish) + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + scope: "@http-native" + + - name: Install dependencies + run: bun install + + - name: Build (release) + run: bun run build:release + + - name: Publish to npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 6ef61fa..941aa2c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,10 @@ { - "name": "http-native", + "name": "@http-native/core", "version": "0.1.0", "type": "module", - "private": true, + "publishConfig": { + "access": "public" + }, "exports": { ".": { "types": "./src/index.d.ts", From c2120946c91b846ae34daff887772cd1684e60ab Mon Sep 17 00:00:00 2001 From: "Nadhi-(Kushi)" Date: Sun, 29 Mar 2026 14:33:52 +0530 Subject: [PATCH 2/2] chore: fix the one line --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b01a44..02388af 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,7 @@ name: Publish to npm on: release: types: [created] + workflow_dispatch: jobs: build: