Skip to content

Commit b83891c

Browse files
committed
fix(workflow): move publish flutter steps to a new workflow which triggers on push to tag; fix(npm): repository url warning; fix(flutter): descriptions; use unique .gitignore from the root folder
1 parent adbf4e3 commit b83891c

10 files changed

Lines changed: 113 additions & 57 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: publish flutter package
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-22.04
14+
name: publish to pub.dev
15+
16+
steps:
17+
18+
- uses: actions/checkout@v4.2.2
19+
20+
- name: download release assets
21+
run: |
22+
VERSION=${GITHUB_REF#refs/tags/}
23+
echo "VERSION=$VERSION" >> $GITHUB_ENV
24+
25+
mkdir -p artifacts
26+
cd artifacts
27+
28+
# Download all platform binaries from the GitHub release
29+
gh release download "$VERSION" --pattern "vector-*.tar.gz"
30+
31+
# Extract all archives
32+
for archive in vector-*.tar.gz; do
33+
name=$(basename "$archive" "-$VERSION.tar.gz")
34+
mkdir -p "$name"
35+
tar -xzf "$archive" -C "$name"
36+
rm "$archive"
37+
done
38+
39+
ls -la
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
43+
- uses: dart-lang/setup-dart@v1.7.1
44+
45+
- name: assemble and publish flutter package
46+
run: |
47+
FLUTTER_DIR=packages/flutter
48+
49+
# Android
50+
mkdir -p $FLUTTER_DIR/native_libraries/android
51+
cp artifacts/vector-android-arm64-v8a/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_arm64.so
52+
cp artifacts/vector-android-armeabi-v7a/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_arm.so
53+
cp artifacts/vector-android-x86_64/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_x64.so
54+
55+
# iOS device
56+
mkdir -p $FLUTTER_DIR/native_libraries/ios
57+
cp artifacts/vector-ios/vector.dylib $FLUTTER_DIR/native_libraries/ios/vector_ios_arm64.dylib
58+
59+
# iOS simulator (keep universal/fat binary as-is)
60+
mkdir -p $FLUTTER_DIR/native_libraries/ios-sim
61+
cp artifacts/vector-ios-sim/vector.dylib $FLUTTER_DIR/native_libraries/ios-sim/vector_ios-sim.dylib
62+
63+
# macOS (separate arch-specific dylibs)
64+
mkdir -p $FLUTTER_DIR/native_libraries/mac
65+
cp artifacts/vector-macos-arm64/vector.dylib $FLUTTER_DIR/native_libraries/mac/vector_mac_arm64.dylib
66+
cp artifacts/vector-macos-x86_64/vector.dylib $FLUTTER_DIR/native_libraries/mac/vector_mac_x64.dylib
67+
68+
# Linux
69+
mkdir -p $FLUTTER_DIR/native_libraries/linux
70+
cp artifacts/vector-linux-x86_64/vector.so $FLUTTER_DIR/native_libraries/linux/vector_linux_x64.so
71+
cp artifacts/vector-linux-arm64/vector.so $FLUTTER_DIR/native_libraries/linux/vector_linux_arm64.so
72+
73+
# Windows
74+
mkdir -p $FLUTTER_DIR/native_libraries/windows
75+
cp artifacts/vector-windows-x86_64/vector.dll $FLUTTER_DIR/native_libraries/windows/vector_windows_x64.dll
76+
77+
# Update version
78+
sed -i "s/^version: .*/version: $VERSION/" $FLUTTER_DIR/pubspec.yaml
79+
80+
# Publish to pub.dev
81+
cd $FLUTTER_DIR
82+
dart pub get
83+
dart pub publish --dry-run
84+
dart pub publish --force

.github/workflows/main.yml

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Build, Test and Release
22
on:
33
push:
4+
branches:
5+
- '**'
6+
tags-ignore:
7+
- '**'
48
workflow_dispatch:
59

610
permissions:
@@ -333,12 +337,9 @@ jobs:
333337
- uses: actions/setup-node@v4
334338
if: steps.tag.outputs.version != ''
335339
with:
336-
node-version: '20'
340+
node-version: '24'
337341
registry-url: 'https://registry.npmjs.org'
338342

339-
- name: update npm # npm 11.5.1 is required for OIDC auth https://docs.npmjs.com/trusted-publishers
340-
run: sudo npm install -g npm@11.5.1
341-
342343
- name: build and publish npm packages
343344
if: steps.tag.outputs.version != ''
344345
run: |
@@ -392,51 +393,10 @@ jobs:
392393
echo " Platform packages: 7"
393394
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
394395
395-
- name: assemble flutter package
396-
if: steps.tag.outputs.version != ''
397-
run: |
398-
VERSION=${{ steps.tag.outputs.version }}
399-
FLUTTER_DIR=packages/flutter
400-
401-
# Android
402-
mkdir -p $FLUTTER_DIR/native_libraries/android
403-
cp artifacts/vector-android-arm64-v8a/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_arm64.so
404-
cp artifacts/vector-android-armeabi-v7a/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_arm.so
405-
cp artifacts/vector-android-x86_64/vector.so $FLUTTER_DIR/native_libraries/android/vector_android_x64.so
406-
407-
# iOS device
408-
mkdir -p $FLUTTER_DIR/native_libraries/ios
409-
cp artifacts/vector-ios/vector.dylib $FLUTTER_DIR/native_libraries/ios/vector_ios_arm64.dylib
410-
411-
# iOS simulator (keep universal/fat binary as-is)
412-
mkdir -p $FLUTTER_DIR/native_libraries/ios-sim
413-
cp artifacts/vector-ios-sim/vector.dylib $FLUTTER_DIR/native_libraries/ios-sim/vector_ios-sim.dylib
414-
415-
# macOS (separate arch-specific dylibs)
416-
mkdir -p $FLUTTER_DIR/native_libraries/mac
417-
cp artifacts/vector-macos-arm64/vector.dylib $FLUTTER_DIR/native_libraries/mac/vector_mac_arm64.dylib
418-
cp artifacts/vector-macos-x86_64/vector.dylib $FLUTTER_DIR/native_libraries/mac/vector_mac_x64.dylib
419-
420-
# Linux
421-
mkdir -p $FLUTTER_DIR/native_libraries/linux
422-
cp artifacts/vector-linux-x86_64/vector.so $FLUTTER_DIR/native_libraries/linux/vector_linux_x64.so
423-
cp artifacts/vector-linux-arm64/vector.so $FLUTTER_DIR/native_libraries/linux/vector_linux_arm64.so
424-
425-
# Windows
426-
mkdir -p $FLUTTER_DIR/native_libraries/windows
427-
cp artifacts/vector-windows-x86_64/vector.dll $FLUTTER_DIR/native_libraries/windows/vector_windows_x64.dll
428-
429-
# Update version
430-
sed -i "s/^version: .*/version: $VERSION/" $FLUTTER_DIR/pubspec.yaml
431-
432-
# Publish to pub.dev
433-
cd $FLUTTER_DIR
434-
dart pub publish --dry-run
435-
dart pub publish --force
436-
437396
- uses: softprops/action-gh-release@v2.2.1
438397
if: steps.tag.outputs.version != ''
439398
with:
399+
token: ${{ secrets.RELEASE_PAT }}
440400
body: |
441401
# Packages
442402

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ CLAUDE.md
4848

4949
# Dart/Flutter
5050
.dart_tool/
51-
pubspec.lock
51+
pubspec.lock
52+
.flutter-plugins
53+
.flutter-plugins-dependencies
54+
packages/flutter/native_libraries/

packages/flutter/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/flutter/.pubignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Only ignore development files, NOT native_libraries
2+
.dart_tool/
3+
pubspec.lock
4+
5+
# Explicitly include native_libraries (override any parent .gitignore)
6+
!native_libraries/
7+
!native_libraries/**

packages/flutter/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.9.81
1+
## 0.9.83
22

33
- Initial release.
44
- Bundles pre-built sqlite-vector binaries for Android, iOS, macOS, Linux, and Windows.

packages/flutter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# sqlite_vector
22

3-
SQLite Vector extension for Flutter/Dart. Provides vector search with SIMD-optimized distance functions (L2, cosine, dot product) for Float32, Float16, Int8, and 1Bit vectors.
3+
SQLite Vector is a cross-platform, ultra-efficient SQLite extension that brings vector search capabilities to your embedded database. It works seamlessly on iOS, Android, Windows, Linux, and macOS, using just 30MB of memory by default. With support for Float32, Float16, BFloat16, Int8, UInt8 and 1Bit, and highly optimized distance functions, it's the ideal solution for Edge AI applications.
44

55
## Installation
66

packages/flutter/pubspec.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: sqlite_vector
2-
version: 0.9.81
2+
version: 0.9.83
33
description: >
4-
SQLite Vector extension for Flutter/Dart. Provides vector search with
5-
SIMD-optimized distance functions (L2, cosine, dot product) for
6-
Float32, Float16, Int8, 1Bit vectors.
4+
SQLite Vector is a cross-platform, ultra-efficient SQLite extension that
5+
brings vector search capabilities to your embedded database. It works
6+
seamlessly on iOS, Android, Windows, Linux, and macOS, using just 30MB of
7+
memory by default. With support for Float32, Float16, BFloat16, Int8, UInt8
8+
and 1Bit, and highly optimized distance functions, it's the ideal solution
9+
for Edge AI applications.
710
homepage: https://github.com/sqliteai/sqlite-vector
811
repository: https://github.com/sqliteai/sqlite-vector
912

packages/node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"license": "SEE LICENSE IN LICENSE.md",
4545
"repository": {
4646
"type": "git",
47-
"url": "https://github.com/sqliteai/sqlite-vector.git",
47+
"url": "git+https://github.com/sqliteai/sqlite-vector.git",
4848
"directory": "packages/node"
4949
},
5050
"homepage": "https://github.com/sqliteai/sqlite-vector#readme",
5151
"bugs": {
52-
"url": "https://github.com/sqliteai/sqlite-vector/issues"
52+
"url": "git+https://github.com/sqliteai/sqlite-vector/issues"
5353
},
5454
"engines": {
5555
"node": ">=16.0.0"

src/sqlite-vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
extern "C" {
2525
#endif
2626

27-
#define SQLITE_VECTOR_VERSION "0.9.82"
27+
#define SQLITE_VECTOR_VERSION "0.9.83"
2828

2929
SQLITE_VECTOR_API int sqlite3_vector_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi);
3030

0 commit comments

Comments
 (0)