From 69f1a524e6c9af711f4f2f3adc89bf33aacda0a6 Mon Sep 17 00:00:00 2001 From: Khurdhula-Harshavardhan Date: Wed, 22 Jul 2026 16:56:24 -0700 Subject: [PATCH 1/3] chore: versioning --- .github/workflows/publish.yml | 46 +++++++++++++++++++++++++++++++++++ jsr.json | 8 ++++++ package.json | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml create mode 100644 jsr.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..95acaab --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +name: Publish + +# Manually create a GitHub Release -> publishes `interfaze` to npm +# and `@interfaze/interfaze` to JSR. +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + +jobs: + npm-publish: + name: Publish to npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + # Node 24 ships npm 11 (needed later if you switch to OIDC trusted publishing). + node-version: "24.x" + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm run build + - name: Publish to npm + # Repo is private, so provenance (--provenance) is omitted; add it once the + # repo is public and you move to OIDC trusted publishing. + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + jsr-publish: + name: Publish to JSR + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # OIDC auth for JSR — no token needed. + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + - run: npm ci + - name: Publish to JSR + run: npx jsr publish --allow-slow-types diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..3fa92ed --- /dev/null +++ b/jsr.json @@ -0,0 +1,8 @@ +{ + "name": "@interfaze/interfaze", + "version": "1.0.0", + "exports": "./src/index.ts", + "publish": { + "include": ["src", "README.md", "LICENSE", "jsr.json"] + } +} diff --git a/package.json b/package.json index 1b6a806..cdf2d04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interfaze", - "version": "0.1.0", + "version": "1.0.0", "description": "Official Interfaze SDK — a typed wrapper over the OpenAI SDK for the Interfaze API (deterministic task model).", "license": "MIT", "author": "Interfaze", From 531b72449c68c884c9fd1ca27f93be1e3990355d Mon Sep 17 00:00:00 2001 From: Khurdhula-Harshavardhan Date: Wed, 22 Jul 2026 16:57:31 -0700 Subject: [PATCH 2/3] chore: fix repository url --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdf2d04..6eccb28 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "author": "Interfaze", "homepage": "https://interfaze.ai", - "repository": { "type": "git", "url": "git+https://github.com/interfaze/interfaze-js.git" }, + "repository": { "type": "git", "url": "git+https://github.com/InterfazeAI/interfaze-js.git" }, "keywords": ["interfaze", "openai", "ai", "ocr", "speech-to-text", "web-search", "sdk"], "type": "module", "main": "./dist/index.cjs", From f6e7969f1e606056c171f60a868f1e5860972b21 Mon Sep 17 00:00:00 2001 From: Khurdhula-Harshavardhan Date: Wed, 22 Jul 2026 17:00:00 -0700 Subject: [PATCH 3/3] chore: use npm oidc trusted publishing --- .github/workflows/publish.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 95acaab..138eb42 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,21 +14,23 @@ jobs: npm-publish: name: Publish to npm runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # OIDC handshake for npm Trusted Publishing — no token needed. steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - # Node 24 ships npm 11 (needed later if you switch to OIDC trusted publishing). + # Trusted Publishing needs npm >= 11.5.1. Node 24 ships npm 11.x; + # Node 22's bundled npm 10.x fails the OIDC handshake with a misleading 404. node-version: "24.x" registry-url: "https://registry.npmjs.org" - run: npm ci - run: npm run build - name: Publish to npm - # Repo is private, so provenance (--provenance) is omitted; add it once the - # repo is public and you move to OIDC trusted publishing. + # No --provenance: npm does not support provenance for private repos. + # Add it once interfaze-js is public. run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} jsr-publish: name: Publish to JSR