Skip to content

Commit 0c59c68

Browse files
committed
fix node release
1 parent 7bc1b33 commit 0c59c68

File tree

5 files changed

+156
-27
lines changed

5 files changed

+156
-27
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,19 @@ jobs:
4141
with:
4242
packages-dir: python-api/dist/
4343

44+
- name: Create GitHub Release
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
files: python-api/dist/*
48+
generate_release_notes: true
49+
4450
release-nodejs:
4551
name: Release Node.js to npm
4652
runs-on: ubuntu-latest
4753
if: startsWith(github.ref, 'refs/tags/node-')
54+
permissions:
55+
id-token: write # Required for trusted publishing (provenance)
56+
contents: read
4857
steps:
4958
- uses: actions/checkout@v4
5059

@@ -65,11 +74,15 @@ jobs:
6574
npm run build
6675
6776
- name: Publish to npm
68-
env:
69-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7077
run: |
7178
cd nodejs-api
72-
npm publish --access public
79+
npm publish --access public --provenance
80+
81+
- name: Create GitHub Release
82+
uses: softprops/action-gh-release@v1
83+
with:
84+
files: nodejs-api/dist/*
85+
generate_release_notes: true
7386

7487
build-rust-binaries:
7588
name: Build Rust CLI - ${{ matrix.target }}

RELEASE.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ PyPI uses **Trusted Publishing** (OIDC), which requires no tokens or passwords:
4949

5050
For more info: https://docs.pypi.org/trusted-publishers/
5151

52-
### 2. npm Token (for Node.js releases)
52+
### 2. npm Trusted Publishing (for Node.js releases)
5353

54-
1. Log in to npm: `npm login`
55-
2. Generate a new access token: https://www.npmjs.com/settings/YOUR_USERNAME/tokens
56-
3. Create a "Automation" token (or "Publish" token)
57-
4. In your GitHub repository, go to Settings > Secrets and variables > Actions
58-
5. Create a new secret named `NPM_TOKEN` and paste the token
54+
npm uses **Provenance** (similar to PyPI's Trusted Publishing), which requires no tokens:
55+
56+
1. Make sure you have publishing rights to the `@vectorize-io/iris` package on npm
57+
2. The package must already exist on npm (do a manual publish first if needed)
58+
3. Once published, npm automatically trusts releases from GitHub Actions with `--provenance` flag
59+
60+
**No additional setup required** - npm will automatically verify the GitHub Actions identity using OIDC.
61+
62+
For more info: https://docs.npmjs.com/generating-provenance-statements
5963

6064
### 3. Update install.sh
6165

@@ -142,7 +146,7 @@ npm install vectorize-iris
142146

143147
### Rust CLI (via install script)
144148
```bash
145-
curl -sSL https://raw.githubusercontent.com/YOUR_USERNAME/vectorize-iris/main/install.sh | bash
149+
curl -fsSL https://raw.githubusercontent.com/vectorize-io/vectorize-iris/refs/heads/main/install.sh | sh
146150
```
147151

148152
Or download binaries directly from the [GitHub Releases page](https://github.com/YOUR_USERNAME/vectorize-iris/releases).
@@ -194,6 +198,7 @@ git push origin py-0.1.0
194198
cd nodejs-api
195199
npm run build
196200
npm publish --access public # Required for scoped packages (@vectorize-io/iris)
201+
# Note: Add --provenance flag when publishing from CI for trusted publishing
197202

198203
# Create and push tag
199204
git tag node-0.2.0

nodejs-api/README.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
1-
# Node.js/TypeScript API - Examples
1+
# Vectorize Iris Node.js SDK
22

3-
Simple TypeScript library for extracting text from documents using Vectorize Iris.
3+
**AI-powered document text extraction for Node.js & TypeScript**
44

5-
## Installation
5+
Extract text, tables, and structured data from PDFs, images, and documents with a single async function. Built on Vectorize Iris, the industry-leading AI extraction service.
6+
7+
[![npm version](https://badge.fury.io/js/@vectorize-io%2Firis.svg)](https://badge.fury.io/js/@vectorize-io%2Firis)
8+
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
11+
## Why Iris?
12+
13+
Traditional OCR tools struggle with complex layouts, poor scans, and structured data. Iris uses advanced AI to deliver:
14+
15+
-**High accuracy** - Even with poor quality or complex documents
16+
- 📊 **Structure preservation** - Maintains tables, lists, and formatting
17+
- 🎯 **Smart chunking** - Semantic splitting perfect for RAG pipelines
18+
- 🔍 **Metadata extraction** - Extract specific fields using natural language
19+
- 🚀 **TypeScript native** - Full type safety with built-in types
20+
-**Async-first** - Promise-based API for modern Node.js
21+
22+
## Quick Start
23+
24+
### Installation
625

726
```bash
827
npm install @vectorize-io/iris
928
```
1029

11-
Set your credentials:
30+
### Authentication
31+
32+
Set your credentials (get them at [vectorize.io](https://vectorize.io)):
33+
1234
```bash
1335
export VECTORIZE_API_TOKEN="your-token"
1436
export VECTORIZE_ORG_ID="your-org-id"
1537
```
1638

17-
## Basic Text Extraction
39+
### Basic Usage
40+
41+
```typescript
42+
import { extractTextFromFile } from '@vectorize-io/iris';
43+
44+
const result = await extractTextFromFile('document.pdf');
45+
console.log(result.text);
46+
```
47+
48+
That's it! Iris handles file upload, extraction, and polling automatically.
49+
50+
## Features
51+
52+
### Basic Text Extraction
1853

1954
```typescript
2055
import { extractTextFromFile } from '@vectorize-io/iris';

python-api/README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,54 @@
1-
# Python API - Examples
1+
# Vectorize Iris Python SDK
22

3-
Simple Python library for extracting text from documents using Vectorize Iris.
3+
**AI-powered document text extraction for Python**
44

5-
## Installation
5+
Extract text, tables, and structured data from PDFs, images, and documents with a single function call. Built on Vectorize Iris, the industry-leading AI extraction service.
6+
7+
[![PyPI version](https://badge.fury.io/py/vectorize-iris.svg)](https://badge.fury.io/py/vectorize-iris)
8+
[![Python](https://img.shields.io/pypi/pyversions/vectorize-iris.svg)](https://pypi.org/project/vectorize-iris/)
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
11+
## Why Iris?
12+
13+
Traditional OCR tools struggle with complex layouts, poor scans, and structured data. Iris uses advanced AI to deliver:
14+
15+
-**High accuracy** - Even with poor quality or complex documents
16+
- 📊 **Structure preservation** - Maintains tables, lists, and formatting
17+
- 🎯 **Smart chunking** - Semantic splitting perfect for RAG pipelines
18+
- 🔍 **Metadata extraction** - Extract specific fields using natural language
19+
-**Simple API** - One line of code to extract text
20+
21+
## Quick Start
22+
23+
### Installation
624

725
```bash
826
pip install vectorize-iris
927
```
1028

11-
Set your credentials:
29+
### Authentication
30+
31+
Set your credentials (get them at [vectorize.io](https://vectorize.io)):
32+
1233
```bash
1334
export VECTORIZE_API_TOKEN="your-token"
1435
export VECTORIZE_ORG_ID="your-org-id"
1536
```
1637

17-
## Basic Text Extraction
38+
### Basic Usage
39+
40+
```python
41+
from vectorize_iris import extract_text_from_file
42+
43+
result = extract_text_from_file('document.pdf')
44+
print(result.text)
45+
```
46+
47+
That's it! Iris handles file upload, extraction, and polling automatically.
48+
49+
## Features
50+
51+
### Basic Text Extraction
1852

1953
```python
2054
from vectorize_iris import extract_text_from_file

rust-cli/README.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,64 @@
1-
# Rust CLI - Examples
1+
# Vectorize Iris CLI
22

3-
Beautiful command-line tool for extracting text from documents using Vectorize Iris.
3+
**⚡ Lightning-fast AI document extraction from your terminal**
44

5-
## Installation
5+
A beautiful, cross-platform CLI for extracting text, tables, and structured data from PDFs, images, and documents. Powered by Vectorize Iris AI.
6+
7+
[![Crates.io](https://img.shields.io/crates/v/vectorize-iris.svg)](https://crates.io/crates/vectorize-iris)
8+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9+
10+
## Why Use the CLI?
11+
12+
- 🎨 **Beautiful output** - Color-coded, formatted terminal display
13+
-**Blazing fast** - Native Rust performance
14+
- 🔧 **Scriptable** - JSON/YAML output for automation
15+
- 📦 **Zero dependencies** - Single binary, no runtime needed
16+
- 🌍 **Cross-platform** - Works on Linux, macOS, and Windows
17+
- 🔌 **Pipeline-ready** - Perfect for shell scripts and CI/CD
18+
19+
## Quick Start
20+
21+
### Installation
622

723
```bash
8-
curl -fsSL https://install.vectorize.io/iris | sh
24+
curl -fsSL https://raw.githubusercontent.com/vectorize-io/vectorize-iris/refs/heads/main/install.sh | sh
925
```
1026

11-
Or install manually from [releases](https://github.com/vectorize/vectorize-iris/releases).
27+
**Alternative methods:**
28+
- Download from [GitHub Releases](https://github.com/vectorize-io/vectorize-iris/releases)
29+
- Install with `cargo install vectorize-iris` (requires Rust)
30+
31+
### Authentication
32+
33+
Set your credentials (get them at [vectorize.io](https://vectorize.io)):
1234

13-
Set your credentials:
1435
```bash
1536
export VECTORIZE_API_TOKEN="your-token"
1637
export VECTORIZE_ORG_ID="your-org-id"
1738
```
1839

19-
## Basic Text Extraction
40+
### Basic Usage
41+
42+
```bash
43+
vectorize-iris document.pdf
44+
```
45+
46+
That's it! Get beautiful, formatted output in your terminal.
47+
48+
## Output Formats
49+
50+
The CLI supports multiple output formats for different use cases:
51+
52+
| Format | Use Case | Command |
53+
|--------|----------|---------|
54+
| **Pretty** (default) | Interactive use, beautiful terminal output | `vectorize-iris doc.pdf` |
55+
| **JSON** | Scripting, piping to `jq` | `vectorize-iris doc.pdf -o json` |
56+
| **YAML** | Config files, human-readable data | `vectorize-iris doc.pdf -o yaml` |
57+
| **Text** | Plain text only, no formatting | `vectorize-iris doc.pdf -o text` |
58+
59+
## Examples
60+
61+
### Basic Text Extraction
2062

2163
```bash
2264
vectorize-iris document.pdf

0 commit comments

Comments
 (0)