Skip to content

Commit 177dd3d

Browse files
committed
release: v0.2.0-rc.1
- Redesign release workflow with multi-platform V8 sidecar builds (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64) - Replace single Docker-based linux-x64 build with GHA matrix + artifact download - Fix V8 package version sync (v8 wrapper, platform packages, optionalDependencies) - Add win32-x64 to @secure-exec/v8 optionalDependencies - Add README.md to platform package files arrays - Bump all packages to 0.2.0-rc.1
1 parent 86353c9 commit 177dd3d

17 files changed

Lines changed: 196 additions & 84 deletions

File tree

.github/workflows/release.yml

Lines changed: 116 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: "Version to publish (e.g. 0.1.0-rc.2)"
7+
description: "Version to publish (e.g. 0.2.0-rc.1)"
88
required: true
99
type: string
1010
npm-tag:
@@ -20,7 +20,88 @@ concurrency:
2020
cancel-in-progress: false
2121

2222
jobs:
23+
# Build V8 sidecar binaries for all platforms
24+
build-v8:
25+
name: "Build V8 (${{ matrix.npm-dir }})"
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
include:
30+
- target: x86_64-unknown-linux-gnu
31+
os: ubuntu-latest
32+
npm-dir: linux-x64-gnu
33+
binary: secure-exec-v8
34+
- target: aarch64-unknown-linux-gnu
35+
os: ubuntu-latest
36+
npm-dir: linux-arm64-gnu
37+
binary: secure-exec-v8
38+
cross: true
39+
- target: x86_64-apple-darwin
40+
os: macos-13
41+
npm-dir: darwin-x64
42+
binary: secure-exec-v8
43+
- target: aarch64-apple-darwin
44+
os: macos-latest
45+
npm-dir: darwin-arm64
46+
binary: secure-exec-v8
47+
- target: x86_64-pc-windows-msvc
48+
os: windows-latest
49+
npm-dir: win32-x64
50+
binary: secure-exec-v8.exe
51+
runs-on: ${{ matrix.os }}
52+
steps:
53+
- name: Checkout tag
54+
uses: actions/checkout@v4
55+
with:
56+
ref: v${{ inputs.version }}
57+
58+
- name: Set up Rust toolchain
59+
uses: dtolnay/rust-toolchain@stable
60+
with:
61+
toolchain: "1.85.0"
62+
targets: ${{ matrix.target }}
63+
64+
- name: Cache Rust build artifacts
65+
uses: actions/cache@v4
66+
with:
67+
path: |
68+
~/.cargo/registry
69+
~/.cargo/git
70+
native/v8-runtime/target
71+
key: rust-release-${{ matrix.target }}-${{ hashFiles('native/v8-runtime/Cargo.lock') }}
72+
restore-keys: |
73+
rust-release-${{ matrix.target }}-
74+
75+
- name: Install cross-compilation tools
76+
if: matrix.cross
77+
run: |
78+
sudo apt-get update
79+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
80+
81+
- name: Configure cross-compilation linker
82+
if: matrix.cross
83+
working-directory: native/v8-runtime
84+
run: |
85+
mkdir -p .cargo
86+
cat > .cargo/config.toml <<'EOF'
87+
[target.aarch64-unknown-linux-gnu]
88+
linker = "aarch64-linux-gnu-gcc"
89+
EOF
90+
91+
- name: Build
92+
working-directory: native/v8-runtime
93+
run: cargo build --release --target ${{ matrix.target }}
94+
95+
- name: Upload binary artifact
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: v8-${{ matrix.npm-dir }}
99+
path: native/v8-runtime/target/${{ matrix.target }}/release/${{ matrix.binary }}
100+
101+
# Publish all packages to npm after V8 binaries are built
23102
publish:
103+
name: "Publish"
104+
needs: [build-v8]
24105
runs-on: ubuntu-latest
25106
permissions:
26107
contents: write
@@ -52,10 +133,38 @@ jobs:
52133
- name: Build
53134
run: pnpm turbo build
54135

55-
- name: Build linux-x64 binary via Docker
136+
# Download all V8 platform binaries into their npm package dirs
137+
- name: Download V8 binaries
138+
uses: actions/download-artifact@v4
139+
with:
140+
pattern: v8-*
141+
path: native/v8-runtime/npm
142+
143+
- name: Place V8 binaries
56144
run: |
57-
cd native/v8-runtime
58-
docker build -f docker/Dockerfile.linux-x64-gnu -o type=local,dest=npm/linux-x64-gnu .
145+
for dir in native/v8-runtime/npm/v8-*/; do
146+
PLATFORM_DIR=$(basename "$dir" | sed 's/^v8-//')
147+
TARGET_DIR="native/v8-runtime/npm/${PLATFORM_DIR}"
148+
if [ -d "$TARGET_DIR" ]; then
149+
cp "$dir"/* "$TARGET_DIR/"
150+
# Make binary executable on Unix platforms
151+
find "$TARGET_DIR" -name "secure-exec-v8" -exec chmod +x {} \;
152+
echo "✓ Placed binary in ${TARGET_DIR}"
153+
fi
154+
done
155+
# Verify all platform packages have their binary
156+
echo "--- Binary verification ---"
157+
for dir in native/v8-runtime/npm/*/; do
158+
PLATFORM=$(basename "$dir")
159+
# Skip artifact staging dirs
160+
if [[ "$PLATFORM" == v8-* ]]; then continue; fi
161+
if ls "$dir"secure-exec-v8* 1>/dev/null 2>&1; then
162+
echo "✓ ${PLATFORM}: $(ls "$dir"secure-exec-v8*)"
163+
else
164+
echo "✗ ${PLATFORM}: MISSING BINARY"
165+
exit 1
166+
fi
167+
done
59168
60169
- name: Publish to npm
61170
run: |
@@ -84,6 +193,9 @@ jobs:
84193
if [ ! -f "$dir/package.json" ]; then
85194
continue
86195
fi
196+
# Skip artifact staging dirs
197+
PLATFORM=$(basename "$dir")
198+
if [[ "$PLATFORM" == v8-* ]]; then continue; fi
87199
NAME=$(jq -r .name "$dir/package.json")
88200
VERSION="${{ inputs.version }}"
89201
if npm view "${NAME}@${VERSION}" version >/dev/null 2>&1; then

native/v8-runtime/npm/darwin-arm64/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "@secure-exec/v8-darwin-arm64",
3-
"version": "0.1.0",
3+
"version": "0.2.0-rc.1",
44
"license": "Apache-2.0",
5-
"os": ["darwin"],
6-
"cpu": ["arm64"],
5+
"os": [
6+
"darwin"
7+
],
8+
"cpu": [
9+
"arm64"
10+
],
711
"main": "secure-exec-v8",
8-
"files": ["secure-exec-v8"],
12+
"files": [
13+
"secure-exec-v8",
14+
"README.md"
15+
],
916
"repository": {
1017
"type": "git",
1118
"url": "https://github.com/rivet-dev/secure-exec.git",

native/v8-runtime/npm/darwin-x64/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "@secure-exec/v8-darwin-x64",
3-
"version": "0.1.0",
3+
"version": "0.2.0-rc.1",
44
"license": "Apache-2.0",
5-
"os": ["darwin"],
6-
"cpu": ["x64"],
5+
"os": [
6+
"darwin"
7+
],
8+
"cpu": [
9+
"x64"
10+
],
711
"main": "secure-exec-v8",
8-
"files": ["secure-exec-v8"],
12+
"files": [
13+
"secure-exec-v8",
14+
"README.md"
15+
],
916
"repository": {
1017
"type": "git",
1118
"url": "https://github.com/rivet-dev/secure-exec.git",

native/v8-runtime/npm/linux-arm64-gnu/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "@secure-exec/v8-linux-arm64-gnu",
3-
"version": "0.1.0",
3+
"version": "0.2.0-rc.1",
44
"license": "Apache-2.0",
5-
"os": ["linux"],
6-
"cpu": ["arm64"],
5+
"os": [
6+
"linux"
7+
],
8+
"cpu": [
9+
"arm64"
10+
],
711
"main": "secure-exec-v8",
8-
"files": ["secure-exec-v8"],
12+
"files": [
13+
"secure-exec-v8",
14+
"README.md"
15+
],
916
"repository": {
1017
"type": "git",
1118
"url": "https://github.com/rivet-dev/secure-exec.git",

native/v8-runtime/npm/linux-x64-gnu/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "@secure-exec/v8-linux-x64-gnu",
3-
"version": "0.1.0",
3+
"version": "0.2.0-rc.1",
44
"license": "Apache-2.0",
5-
"os": ["linux"],
6-
"cpu": ["x64"],
5+
"os": [
6+
"linux"
7+
],
8+
"cpu": [
9+
"x64"
10+
],
711
"main": "secure-exec-v8",
8-
"files": ["secure-exec-v8"],
12+
"files": [
13+
"secure-exec-v8",
14+
"README.md"
15+
],
916
"repository": {
1017
"type": "git",
1118
"url": "https://github.com/rivet-dev/secure-exec.git",

native/v8-runtime/npm/win32-x64/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "@secure-exec/v8-win32-x64",
3-
"version": "0.1.0",
3+
"version": "0.2.0-rc.1",
44
"license": "Apache-2.0",
5-
"os": ["win32"],
6-
"cpu": ["x64"],
5+
"os": [
6+
"win32"
7+
],
8+
"cpu": [
9+
"x64"
10+
],
711
"main": "secure-exec-v8.exe",
8-
"files": ["secure-exec-v8.exe"],
12+
"files": [
13+
"secure-exec-v8.exe",
14+
"README.md"
15+
],
916
"repository": {
1017
"type": "git",
1118
"url": "https://github.com/rivet-dev/secure-exec.git",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "secure-exec-monorepo",
3-
"version": "0.1.1-rc.3",
3+
"version": "0.2.0-rc.1",
44
"private": true,
55
"license": "Apache-2.0",
66
"type": "module",

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secure-exec/browser",
3-
"version": "0.1.1-rc.3",
3+
"version": "0.2.0-rc.1",
44
"type": "module",
55
"license": "Apache-2.0",
66
"main": "./dist/index.js",

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": "@secure-exec/core",
3-
"version": "0.1.1-rc.3",
3+
"version": "0.2.0-rc.1",
44
"type": "module",
55
"license": "Apache-2.0",
66
"main": "./dist/index.js",

packages/nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secure-exec/nodejs",
3-
"version": "0.1.1-rc.3",
3+
"version": "0.2.0-rc.1",
44
"type": "module",
55
"license": "Apache-2.0",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)