Skip to content

Commit d2f55ca

Browse files
m96-chanclaude
andcommitted
Bump version to 0.5.2 and add version consistency check
Add version-check job to publish.yml that verifies all 7 version sources match the tag before any publish jobs run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4748643 commit d2f55ca

9 files changed

Lines changed: 49 additions & 11 deletions

File tree

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,42 @@ on:
66
- "v*" # e.g. v0.2.1
77

88
jobs:
9+
# ── version consistency check ──
10+
version-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Verify version consistency
15+
run: |
16+
TAG="${GITHUB_REF#refs/tags/v}"
17+
echo "Tag version: $TAG"
18+
ERRORS=0
19+
check() {
20+
local file=$1 ver=$2
21+
if [ "$ver" != "$TAG" ]; then
22+
echo "::error file=$file::Version mismatch: $ver (expected $TAG)"
23+
ERRORS=$((ERRORS + 1))
24+
else
25+
echo "✓ $file: $ver"
26+
fi
27+
}
28+
check packages/core/package.json \
29+
"$(node -p "require('./packages/core/package.json').version")"
30+
for toml in packages/rust/crates/oxbitnet/Cargo.toml \
31+
packages/rust/crates/oxbitnet-ffi/Cargo.toml \
32+
packages/rust/crates/oxbitnet-java/Cargo.toml \
33+
packages/rust/crates/oxbitnet-python/Cargo.toml; do
34+
check "$toml" "$(grep -m1 '^version' "$toml" | sed 's/.*"\(.*\)"/\1/')"
35+
done
36+
check packages/rust/crates/oxbitnet-python/pyproject.toml \
37+
"$(grep -m1 '^version' packages/rust/crates/oxbitnet-python/pyproject.toml | sed 's/.*"\(.*\)"/\1/')"
38+
check packages/rust/crates/oxbitnet-java/java/build.gradle.kts \
39+
"$(grep -m1 '^version' packages/rust/crates/oxbitnet-java/java/build.gradle.kts | sed 's/.*"\(.*\)"/\1/')"
40+
exit $ERRORS
41+
942
# ── crates.io ──
1043
publish-crate:
44+
needs: version-check
1145
if: startsWith(github.ref, 'refs/tags/v')
1246
runs-on: ubuntu-latest
1347
steps:
@@ -27,6 +61,7 @@ jobs:
2761

2862
# ── PyPI (maturin) ──
2963
build-wheels:
64+
needs: version-check
3065
if: startsWith(github.ref, 'refs/tags/v')
3166
runs-on: ${{ matrix.os }}
3267
strategy:
@@ -78,6 +113,7 @@ jobs:
78113

79114
# ── npm ──
80115
publish-npm:
116+
needs: version-check
81117
if: startsWith(github.ref, 'refs/tags/v')
82118
runs-on: ubuntu-latest
83119
permissions:
@@ -103,6 +139,7 @@ jobs:
103139

104140
# ── Swift (XCFramework → GitHub Release) ──
105141
build-xcframework:
142+
needs: version-check
106143
if: startsWith(github.ref, 'refs/tags/v')
107144
runs-on: macos-latest
108145
steps:
@@ -190,6 +227,7 @@ jobs:
190227
191228
# ── Java (Maven Central) ──
192229
build-java-natives:
230+
needs: version-check
193231
if: startsWith(github.ref, 'refs/tags/v')
194232
runs-on: ${{ matrix.os }}
195233
strategy:

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "0xbitnet",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "Run BitNet b1.58 ternary LLMs with WebGPU",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/rust/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/rust/crates/oxbitnet-ffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oxbitnet-ffi"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
edition = "2021"
55
description = "C FFI bindings for oxbitnet — run BitNet b1.58 ternary LLMs with wgpu"
66
license = "MIT"

packages/rust/crates/oxbitnet-java/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oxbitnet-java"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
edition = "2021"
55
description = "Java/JNI bindings for oxbitnet — run BitNet b1.58 ternary LLMs with wgpu"
66
license = "MIT"

packages/rust/crates/oxbitnet-java/java/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = "io.github.m96-chan"
7-
version = "0.5.0"
7+
version = "0.5.2"
88

99
java {
1010
sourceCompatibility = JavaVersion.VERSION_17

packages/rust/crates/oxbitnet-python/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oxbitnet-python"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
edition = "2021"
55
publish = false
66

packages/rust/crates/oxbitnet-python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "oxbitnet"
7-
version = "0.5.1"
7+
version = "0.5.2"
88
description = "Run BitNet b1.58 ternary LLMs with wgpu"
99
readme = "README.md"
1010
requires-python = ">=3.9"

packages/rust/crates/oxbitnet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oxbitnet"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
edition = "2021"
55
description = "Run BitNet b1.58 ternary LLMs with wgpu"
66
license = "MIT"

0 commit comments

Comments
 (0)