diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..138eb42 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,48 @@ +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 + 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: + # 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 + # No --provenance: npm does not support provenance for private repos. + # Add it once interfaze-js is public. + run: npm publish --access public + + 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..6eccb28 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "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", "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",