Skip to content

fix(ci): replace stale build-core-executor in crates-publish job #253

fix(ci): replace stale build-core-executor in crates-publish job

fix(ci): replace stale build-core-executor in crates-publish job #253

name: Publish Staging AD4M
on:
push:
branches:
- staging
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 24
- uses: pnpm/action-setup@v4
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.32.4
- name: Delete existing tag (idempotent re-runs)
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="v$VERSION"
echo "Deleting tag $TAG if it exists..."
curl -s -X DELETE \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$TAG" || true
echo "Tag cleanup done"
- name: Create Tags From
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.14
- name: create release ad4m launcher
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.create_tag.outputs.version }}
release_name: ADAM (Launcher & CLI binaries) ${{ steps.create_tag.outputs.version }} Prerelease
body: See the assets to download this version and install.
draft: true
prerelease: true
# ============================================================================
# Generate V8 Deno Snapshot — runs on Linux, artifact shared to Windows
# Windows cannot build generate_snapshot.exe due to irreconcilable CRT
# mismatch (surrealdb-librocksdb-sys mt_static /MT vs V8/deno /MD).
# The snapshot is architecture-specific (x86_64) but OS-independent.
# ============================================================================
generate-deno-snapshot:
runs-on: ubuntu-latest
container:
image: coasys/ad4m-ci-linux:latest@sha256:a0ab4b6358b7314a2ad49e232ba6c53b28a56e7f02641f226b2ed05544cc66d8
needs:
- create-release
steps:
- name: Fetch source code
uses: actions/checkout@v3
- name: Use Node.js 24.x
uses: actions/setup-node@v3
with:
node-version: 24.x
- uses: pnpm/action-setup@v4
- name: pnpm Install
run: pnpm install --no-frozen-lockfile
- name: Generate schema.gql (required for rust-client compilation)
# rust-client/schema.gql is a symlink to core/lib/src/schema.gql which is
# generated (not in git). We must build it before cargo compiles rust-client.
run: cd core && pnpm exec tsx src/buildSchema.ts
- name: Generate deno snapshot
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: |
cd rust-executor && pnpm run build-deno-snapshot && cd ..
- name: Upload snapshot artifact
uses: actions/upload-artifact@v4
with:
name: deno-snapshot
path: rust-executor/CUSTOM_DENO_SNAPSHOT.bin
retention-days: 1
# Linux Binary Build - Uses Docker container (all deps pre-installed)
# ============================================================================
build-launcher-binary-linux:
runs-on: ubuntu-latest
container:
image: coasys/ad4m-ci-linux:latest@sha256:a0ab4b6358b7314a2ad49e232ba6c53b28a56e7f02641f226b2ed05544cc66d8
needs:
- create-release
steps:
- name: Fetch source code
uses: actions/checkout@v3
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
with:
path: ui
# Rust toolchain configured via rust-toolchain.toml (auto-detected by rustup)
# The toml file specifies stable channel with wasm32-unknown-unknown target
- name: Verify Rust toolchain
run: rustc --version && cargo --version && rustup target list --installed | grep wasm
- name: pnpm Install
run: pnpm install --no-frozen-lockfile
- name: Build AD4M-CLI
env:
RUSTY_V8_MIRROR: https://github.com/coasys/rusty_v8/releases/download
run: pnpm build-libs
- name: Build Launcher binary
run: pnpm run package-ad4m
env:
# GitHub Actions container jobs don't always inherit the full system
# PKG_CONFIG_PATH. Set it explicitly so soup3-sys/webkit can find .pc files.
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
- name: Upload Release Deb Asset
id: upload-release-deb-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target/release/bundle/deb/ADAM Launcher_${{ steps.extract_version.outputs.version }}_amd64.deb
asset_name: ADAM Launcher_${{ steps.extract_version.outputs.version }}_amd64.deb
asset_content_type: application/octet-stream
- name: Upload Release AppImage Asset
id: upload-release-appimage-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target/release/bundle/appimage/ADAM Launcher_${{ steps.extract_version.outputs.version }}_amd64.AppImage
asset_name: ADAM Launcher_${{ steps.extract_version.outputs.version }}_amd64.AppImage
asset_content_type: application/octet-stream
#- name: Upload Release AppImage Update Asset
# id: upload-release-appimage-asset-update
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: target/release/bundle/appimage/adam-launcher_${{ steps.extract_version.outputs.version }}_amd64.AppImage.tar.gz
# asset_name: ADAM-Launcher_${{ steps.extract_version.outputs.version }}_amd64.deb.tar.gz
# asset_content_type: application/octet-stream
#- name: Upload Release AppImage update sig Asset
# id: upload-release-appimage-asset-update-sig
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: target/release/bundle/appimage/adam-launcher_${{ steps.extract_version.outputs.version }}_amd64.AppImage.tar.gz.sig
# asset_name: ADAM-Launcher_${{ steps.extract_version.outputs.version }}_amd64.deb.tar.gz.sig
# asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI client Linux Binary
id: upload-release-linux-ad4m-cli-client-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target/release/ad4m
asset_name: ad4m-cli-client-linux-${{ steps.extract_version.outputs.version }}-x64
asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI executor Linux Binary
id: upload-release-linux-ad4m-cli-executor-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target/release/ad4m-executor
asset_name: ad4m-cli-executor-linux-${{ steps.extract_version.outputs.version }}-x64
asset_content_type: application/octet-stream
# ============================================================================
# Linux CUDA Binary Build - Uses CUDA Docker container
# ============================================================================
build-launcher-binary-linux-cuda:
runs-on: ubuntu-latest
container:
image: coasys/ad4m-ci-linux:latest@sha256:a0ab4b6358b7314a2ad49e232ba6c53b28a56e7f02641f226b2ed05544cc66d8
needs:
- create-release
steps:
- name: Fetch source code
uses: actions/checkout@v3
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
with:
path: ui
- name: Verify Rust toolchain
run: rustc --version && cargo --version && rustup target list --installed | grep wasm
- name: Verify CUDA
run: nvcc --version
- name: pnpm Install
run: pnpm install --no-frozen-lockfile
- name: Build AD4M-CLI
env:
RUSTY_V8_MIRROR: https://github.com/coasys/rusty_v8/releases/download
run: pnpm build-libs
- name: Build Launcher binary with CUDA
run: pnpm run package-ad4m:cuda
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
CUDA_COMPUTE_CAP: "80"
- name: Upload Release AppImage CUDA Asset
id: upload-release-appimage-cuda-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: target/release/bundle/appimage/ADAM Launcher_${{ steps.extract_version.outputs.version }}_amd64.AppImage
asset_name: ADAM.Launcher_${{ steps.extract_version.outputs.version }}_amd64_CUDA.AppImage
asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI executor Linux CUDA Binary
id: upload-release-linux-ad4m-cli-executor-cuda-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: target/release/ad4m-executor
asset_name: ad4m-cli-executor-linux-${{ steps.extract_version.outputs.version }}-x64-CUDA
asset_content_type: application/octet-stream
# ============================================================================
# macOS Binary Build - Uses aggressive caching (Docker not available on macOS)
# ============================================================================
build-launcher-binary-macos:
runs-on: macos-14
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
# ARM64 B/BL range fix: -ld_classic is set in .cargo/config.toml
# via [target.aarch64-apple-darwin] rustflags to ensure it reaches
# cargo through turbo. ld_classic generates branch island stubs.
needs:
- create-release
steps:
- name: Fetch source code
uses: actions/checkout@v3
- name: Select Xcode 15.4 (has ld-classic for branch islands)
run: |
sudo xcode-select -s /Applications/Xcode_15.4.app
xcodebuild -version
# Verify ld-classic binary exists at the path used in .cargo/config.toml
ls -la "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic"
# Rust toolchain configured via rust-toolchain.toml
- name: Select Xcode 15.4 (has ld_classic for branch islands)
run: |
sudo xcode-select -s /Applications/Xcode_15.4.app
xcodebuild -version
xcrun ld -v 2>&1 | head -1 || true
# Verify ld_classic exists
ls -la /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic || true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin,aarch64-apple-darwin
# Aggressive Rust caching - biggest time saver for macOS
# shared-key includes package.json version so cache busts on version changes
# (env!("CARGO_PKG_VERSION") is baked in at compile time and won't update from stale cache)
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust-executor
ui/src-tauri
cache-targets: true
cache-all-crates: true
shared-key: "staging-v12-${{ hashFiles('rust-executor/Cargo.toml', 'cli/Cargo.toml') }}"
- name: Install GO
uses: actions/setup-go@v4
with:
go-version: '1.24.6'
cache: true
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x
- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pnpm/action-setup@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v3
with:
node-version: 24.x
cache: 'pnpm'
# Cache Homebrew packages
- name: Cache Homebrew
uses: actions/cache@v4
with:
path: |
~/Library/Caches/Homebrew
/usr/local/Cellar
/opt/homebrew/Cellar
key: ${{ runner.os }}-brew-${{ hashFiles('.github/workflows/publish_staging.yml') }}
restore-keys: |
${{ runner.os }}-brew-
- name: Install dependencies (macOS)
run: brew install protobuf cmake
- name: Install/update node-gyp
run: npm install -g node-gyp
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
with:
path: ui
- name: pnpm Install
run: pnpm install --no-frozen-lockfile
#- name: Decrypt and install certificates
# env:
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# run: |
# echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
# security create-keychain -p "actions" build.keychain
# security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
# security list-keychain -d user -s build.keychain
# security unlock-keychain -p "actions" build.keychain
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "actions" build.keychain
- name: Build AD4M-CLI
env:
RUSTY_V8_MIRROR: https://github.com/coasys/rusty_v8/releases/download
# Use system git instead of libgit2 so cargo does NOT auto-fetch git submodules.
# coasys/deno.git has heavy chromium submodules (wpt, buildtools, abseil-cpp)
# that cause SecureTransport/network errors on macOS runners.
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: pnpm build-libs
- name: Build Launcher binary
#env:
#TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
#TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
#APPLE_ID: ${{ secrets.APPLE_ID }}
#APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
#APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
#APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
#APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
#APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
run: pnpm run package-ad4m
- name: Upload Release macOS DMG Asset
id: upload-release-macos-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: "/Users/runner/work/ad4m/ad4m/target/release/bundle/dmg/ADAM Launcher_${{ steps.extract_version.outputs.version }}_aarch64.dmg"
asset_name: ADAM Launcher_${{ steps.extract_version.outputs.version }}_aarch64.dmg
asset_content_type: application/octet-stream
#- name: Upload Release Macos update Asset
# id: upload-release-macos-asset-update
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: "/Users/runner/work/ad4m/ad4m/target/release/bundle/macos/ADAM Launcher.app.tar.gz"
# asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_aarch64.app.tar.gz
# asset_content_type: application/octet-stream
#- name: Upload Release Macos update sig Asset
# id: upload-release-macos-asset-update-sig
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: "/Users/runner/work/ad4m/ad4m/target/release/bundle/macos/ADAM Launcher.app.tar.gz.sig"
# asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_aarch64.app.tar.gz.sig
# asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI client macOS Binary
id: upload-release-macos-ad4m-cli-client-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /Users/runner/work/ad4m/ad4m/target/release/ad4m
asset_name: ad4m-cli-client-macos-${{ steps.extract_version.outputs.version }}-aarch64
asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI executor macOS Binary
id: upload-release-macos-ad4m-cli-executor-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /Users/runner/work/ad4m/ad4m/target/release/ad4m-executor
asset_name: ad4m-cli-executor-macos-${{ steps.extract_version.outputs.version }}-aarch64
asset_content_type: application/octet-stream
# ============================================================================
# Windows Binary Build - Re-enabled now that V8 uses pre-built binaries
# ============================================================================
build-launcher-binary-windows:
runs-on: windows-latest
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
needs:
- create-release
- generate-deno-snapshot
steps:
- name: Fetch source code
uses: actions/checkout@v3
- name: Enable long paths (Windows MAX_PATH workaround for deno git dep)
shell: powershell
run: |
git config --global core.longpaths true
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
# NOTE: Do NOT install NASM here! aws-lc-sys 0.35.0 detects NASM via
# test_nasm_command() and tries to use it through cmake, which fails.
# Without NASM, it falls back to prebuilt .obj files (controlled by
# AWS_LC_SYS_PREBUILT_NASM=1 in .cargo/config.toml).
# Rust toolchain configured via rust-toolchain.toml
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
# Cache Rust deps - biggest time saver
# shared-key includes Cargo.toml hash so cache busts on version changes
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust-executor
ui/src-tauri
cache-targets: true
cache-all-crates: true
shared-key: "staging-windows-v11-${{ hashFiles('rust-executor/Cargo.toml', 'cli/Cargo.toml') }}"
- name: Install GO
uses: actions/setup-go@v4
with:
go-version: '1.24.6'
cache: true
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x
- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pnpm/action-setup@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v3
with:
node-version: 24.x
cache: 'pnpm'
- name: Install protobuf compiler
run: choco install protoc -y
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
with:
path: ui
- name: pnpm Install
run: pnpm install --no-frozen-lockfile
- name: Hide ALL NASM executables (force aws-lc-sys prebuilt-nasm)
run: |
# aws-lc-sys runs "nasm -version" to detect NASM. If found, it skips
# prebuilt-nasm and relies on cmake to use NASM — which fails silently.
# Hide ALL nasm.exe to force the prebuilt .obj mechanism.
$nasms = @(Get-Command nasm -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)
foreach ($n in $nasms) {
Write-Host "Hiding: $n"
Rename-Item $n "$n.hidden" -ErrorAction SilentlyContinue
}
@("C:\Strawberry\c\bin\nasm.exe", "C:\Program Files\NASM\nasm.exe") | ForEach-Object {
if (Test-Path $_) { Rename-Item $_ "$_.hidden"; Write-Host "Hid: $_" }
}
$check = Get-Command nasm -ErrorAction SilentlyContinue
if ($check) { Write-Host "WARNING: nasm still found at $($check.Source)!" }
else { Write-Host "OK: nasm not found on PATH" }
- name: Build JS dependencies
run: |
# Build JS deps in turbo dependency order (turbo itself breaks
# aws-lc-sys prebuilt-nasm, so we bypass it for cargo).
cd core && pnpm run build && cd ..
cd connect && pnpm run build && cd ..
cd dapp && pnpm run build && cd ..
- name: Download deno snapshot from Linux build
uses: actions/download-artifact@v4
with:
name: deno-snapshot
path: rust-executor/
- name: Build AD4M-CLI
env:
RUSTY_V8_MIRROR: https://github.com/coasys/rusty_v8/releases/download
RUSTFLAGS: -C target-feature=+crt-static
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: cargo build --release
- name: Build Launcher binary
run: pnpm run package-ad4m
- name: Upload Release MSI Asset
id: upload-release-msi-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: 'target\release\bundle\msi\ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi'
asset_name: ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi
asset_content_type: application/octet-stream
- name: Upload Release NSIS Asset
id: upload-release-nsis-asset
uses: actions/upload-release-asset@v1
continue-on-error: true # NSIS might not be produced depending on tauri config
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: 'target\release\bundle\nsis\ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64-setup.exe'
asset_name: ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64-setup.exe
asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI client Windows Binary
id: upload-release-windows-ad4m-cli-client-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: target\release\ad4m.exe
asset_name: ad4m-cli-client-windows-${{ steps.extract_version.outputs.version }}-x64.exe
asset_content_type: application/octet-stream
- name: Upload Release AD4M CLI executor Windows Binary
id: upload-release-windows-ad4m-cli-executor-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: target\release\ad4m-executor.exe
asset_name: ad4m-cli-executor-windows-${{ steps.extract_version.outputs.version }}-x64.exe
asset_content_type: application/octet-stream
# ============================================================================
# NPM Publish - Plain ubuntu runner (no Docker needed, just TS build + publish)
# ============================================================================
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v3
with:
node-version: 24.x
registry-url: 'https://registry.npmjs.org'
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
with:
path: ui
- name: Check if string contains prerelease
run: |
STRING="${{ steps.extract_version.outputs.version }}"
if [[ $STRING == *-* ]]; then
echo "NPM_TAG=next" >> $GITHUB_ENV
else
echo "NPM_TAG=latest" >> $GITHUB_ENV
fi
- name: Install deps
run: pnpm install --no-frozen-lockfile
- name: Build modules
run: pnpm run build-npm-packages
- name: Change Package Visibility to Public
run: |
cd core
sed -i 's/"private": true/"private": false/' package.json
- name: Publish core
run: cd core && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish connect
run: cd connect && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish ad4m hook helpers
run: cd ad4m-hooks/helpers && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish ad4m react hooks
run: cd ad4m-hooks/react && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish ad4m vue hooks
run: cd ad4m-hooks/vue && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish executor
run: cd executor && npm publish --access public --tag ${{ env.NPM_TAG }}
- name: Publish Test runner
run: cd test-runner && npm publish --access public --tag ${{ env.NPM_TAG }}
# ============================================================================
# Crates Publish - Uses Docker container
# ============================================================================
crates-publish:
runs-on: ubuntu-latest
container:
image: coasys/ad4m-ci-linux:latest@sha256:a0ab4b6358b7314a2ad49e232ba6c53b28a56e7f02641f226b2ed05544cc66d8
steps:
- uses: actions/checkout@v3
# Rust toolchain configured via rust-toolchain.toml (auto-detected by rustup)
- name: Verify Rust toolchain
run: rustc --version && cargo --version
- run: pnpm install --no-frozen-lockfile
# Generate schema.gql (required for rust-client compilation)
# build-core-executor no longer exists since Phase 7 removed the JS executor
- run: cd core && pnpm exec tsx src/buildSchema.ts
- run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish ad4m-client crate
working-directory: rust-client
run: |
set +e
OUTPUT=$(cargo publish --allow-dirty 2>&1)
EXIT=$?
set -e
echo "$OUTPUT"
if [ $EXIT -ne 0 ]; then
echo "$OUTPUT" | grep -q "already exists" && echo "Already published — OK" || exit $EXIT
fi