name: Release # One MeshLLM host per platform. Each archive carries that platform's default # Skippy runtime (Metal on macOS, CPU on Linux and Windows), downloaded from # the Skippy release this source pins. GPU runtimes are not built or shipped # here: MeshLLM downloads them from Skippy when a machine needs one. # # Dispatch from main: just release v0.81.0 # Rehearse: just release v0.81.0 --canary (builds, packages and # runs CPU host smokes; pushes and publishes nothing) on: workflow_dispatch: inputs: version: description: Release version/tag to build, for example v0.81.0 required: true type: string canary: description: Dry run. Build, package and run CPU host smokes; publish nothing. required: true default: false type: boolean concurrency: group: release-${{ github.repository }} cancel-in-progress: false permissions: contents: read env: CARGO_PROFILE_RELEASE_DEBUG: "0" CARGO_TERM_COLOR: always # Compiled into release binaries by `mesh-llm-analytics`. Unset in forks and # in local builds, which then report no usage data at all. See # website/src/docs/pages/analytics.md. MESH_LLM_POSTHOG_KEY: ${{ secrets.MESH_LLM_POSTHOG_KEY }} jobs: # Checks this release still needs. A real release stops here, before # anything is pushed. A canary only prints the list. A # representative MeshLLM GPU smoke is enough; Skippy qualifies its own # runtimes and MeshLLM does not repeat inference tests on every platform. release_readiness: name: Refuse a release with known missing checks runs-on: ubuntu-24.04 timeout-minutes: 5 env: CANARY: ${{ inputs.canary }} steps: - name: List the missing checks run: | set -euo pipefail missing=( "Host import check and report: on Linux only stubbed tools have run, and on Windows nothing has, including the call from package-release.ps1." "Docker images and npm: the mesh-packaging handoff is off. Its new contract is only a draft that mesh-packaging has not adopted, and the dispatch is not wired." "GPU smoke: a MeshLLM host has not yet downloaded and loaded the pinned Skippy release's CUDA and ROCm runtimes on representative NVIDIA and AMD machines." "Updating from 0.80.0 on Windows: the step that swaps in the new runtime and manifest is a PowerShell script that no test runs. The Unix path is covered." ) for item in "${missing[@]}"; do if [[ "$CANARY" == "true" ]]; then echo "::warning::Not release-ready: $item"; else echo "::error::Not release-ready: $item"; fi done [[ "$CANARY" == "true" || ${#missing[@]} -eq 0 ]] metadata: name: Prepare the release source needs: release_readiness runs-on: ubuntu-24.04 timeout-minutes: 30 permissions: contents: write outputs: tag: ${{ steps.meta.outputs.tag }} version: ${{ steps.meta.outputs.version }} prerelease: ${{ steps.meta.outputs.prerelease }} source_sha: ${{ steps.source.outputs.sha }} release_notes_base: ${{ steps.source.outputs.release_notes_base }} steps: - name: Require the trusted release ref run: | if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then echo "Releases must be dispatched from refs/heads/main, not $GITHUB_REF." >&2 exit 1 fi - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: persist-credentials: false fetch-depth: 0 - id: meta env: INPUT_VERSION: ${{ inputs.version }} run: | set -euo pipefail version="${INPUT_VERSION#v}" if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then echo "Invalid release version: $INPUT_VERSION" >&2 exit 1 fi prerelease=false [[ "$version" != *-* ]] || prerelease=true { echo "tag=v$version" echo "version=$version" echo "prerelease=$prerelease" } >> "$GITHUB_OUTPUT" - name: Reject an existing release tag if: ${{ !inputs.canary }} env: RELEASE_TAG: ${{ steps.meta.outputs.tag }} run: | set -euo pipefail existing="$(git ls-remote --tags origin "refs/tags/$RELEASE_TAG")" if [[ -n "$existing" ]]; then echo "Release tag already exists and is immutable: $RELEASE_TAG" >&2 exit 1 fi - uses: ./.github/actions/setup - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24.20.0 - name: Commit the version update to main id: source env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_TAG: ${{ steps.meta.outputs.tag }} CANARY: ${{ inputs.canary }} run: | set -euo pipefail source_sha="$GITHUB_SHA" if [[ "$CANARY" == "true" ]]; then echo "Canary: leaving main unchanged. Each build applies the version locally." else scripts/release-version.sh "$RELEASE_TAG" cargo fmt --all -- --check git diff --check git add --update if ! git diff --quiet; then echo "Release version preparation left unstaged tracked changes:" >&2 git status --short >&2 exit 1 fi if git diff --cached --quiet; then echo "main already contains the complete $RELEASE_TAG version update." else git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git commit -m "$RELEASE_TAG: prepare release source" fi source_sha="$(git rev-parse HEAD)" git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$source_sha:refs/heads/main" fi # Release notes compare against the newest stable tag below this version. release_notes_base="$( { git tag --list 'v*' | grep -Ev -- '-' || true; echo "$RELEASE_TAG"; } | sort -V | awk -v tag="$RELEASE_TAG" '$0 == tag { print previous; exit } { previous = $0 }' )" { echo "sha=$source_sha" echo "release_notes_base=$release_notes_base" } >> "$GITHUB_OUTPUT" # MeshLLM must refuse a downloaded runtime that differs from the catalog # entry chosen for the host. Exercise the full download test suite before # any release can be published. runtime_download_gate: name: Refuse runtimes that differ from their catalog entry needs: metadata runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: ./.github/actions/setup - run: cargo test --locked -p mesh-llm-system --test native_runtime_download -- --include-ignored build: name: Build and package ${{ matrix.name }} needs: metadata runs-on: ${{ matrix.os }} timeout-minutes: 120 strategy: fail-fast: false matrix: include: - name: macOS aarch64 os: macos-15 target: aarch64-apple-darwin backend: metal python: python3 - name: Linux x86_64 os: ubuntu-24.04 target: x86_64-unknown-linux-gnu backend: cpu python: python3 - name: Linux aarch64 os: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu backend: cpu - name: Windows x86_64 os: windows-2022 target: x86_64-pc-windows-msvc backend: cpu python: python defaults: run: shell: bash env: RELEASE_TAG: ${{ needs.metadata.outputs.tag }} MESH_RELEASE_COMMIT: ${{ needs.metadata.outputs.source_sha }} MODEL_URL: https://huggingface.co/unsloth/SmolLM2-135M-Instruct-GGUF/resolve/9e6855bc4be717fca1ef21360a1db4b29d5c559a/SmolLM2-135M-Instruct-Q8_0.gguf MODEL_SHA256: c4a3dd037301b6ecea31d6da37f5cd793ead920dd5ddfe6d589294628d6ce66a steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: ./.github/actions/setup # Release binaries are compiled without the shared compiler cache. - name: Set the build environment run: | { echo "SCCACHE_GHA_ENABLED=false" echo "MESH_RELEASE_ATTESTATION_SIGNING_KEY_FILE=$RUNNER_TEMP/mesh-release-attestation-private-key.json" echo "MESH_RELEASE_ATTESTATION_PUBLIC_KEY_FILE=$RUNNER_TEMP/mesh-release-attestation-public-key.json" } >> "$GITHUB_ENV" - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 with: version: 10.34.5 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24.20.0 # Already committed for a real release; a canary applies it here. - name: Apply the release version run: scripts/release-version.sh "$RELEASE_TAG" - name: Download the default Skippy runtime for this platform id: runtime env: BACKEND: ${{ matrix.backend }} run: | set -euo pipefail runtime="$(cargo run --locked --quiet -p mesh-llm-system --example fetch-native-runtime -- "$RUNNER_TEMP/skippy-runtime-cache" | tail -n 1)" [[ -f "$runtime/manifest.json" ]] || { echo "no runtime manifest at $runtime" >&2; exit 1; } kind="$(jq -r '.runtime.backend.kind' "$runtime/manifest.json")" if [[ "$kind" != "$BACKEND" ]]; then echo "The installer chose a $kind runtime; this platform ships $BACKEND." >&2 exit 1 fi echo "MESH_LLM_NATIVE_RUNTIME_DIR=$runtime" >> "$GITHUB_ENV" - name: Build the host run: just release-build - name: Write the release signing keys env: SIGNING_KEY: ${{ secrets.MESH_RELEASE_ATTESTATION_SIGNING_KEY_FILE }} PUBLIC_KEY: ${{ secrets.MESH_RELEASE_ATTESTATION_PUBLIC_KEY_FILE }} CANARY: ${{ inputs.canary }} run: | set -euo pipefail if [[ -z "$SIGNING_KEY" || -z "$PUBLIC_KEY" ]]; then if [[ "$CANARY" != "true" ]]; then echo "A release needs both release signing key secrets." >&2 exit 1 fi echo "Canary without signing keys: the host is packaged unsigned." fi printf '%s' "$SIGNING_KEY" > "$MESH_RELEASE_ATTESTATION_SIGNING_KEY_FILE" printf '%s' "$PUBLIC_KEY" > "$MESH_RELEASE_ATTESTATION_PUBLIC_KEY_FILE" - name: Sign and package run: just release-bundle "$RELEASE_TAG" dist - name: Remove the signing key if: always() run: rm -f "$MESH_RELEASE_ATTESTATION_SIGNING_KEY_FILE" - name: Unpack the archive that will be published id: bundle env: TARGET: ${{ matrix.target }} run: | set -euo pipefail mkdir unpacked if [[ "$RUNNER_OS" == "Windows" ]]; then (cd dist && sha256sum -c "mesh-llm-$RELEASE_TAG-$TARGET.zip.sha256") unzip -q "dist/mesh-llm-$RELEASE_TAG-$TARGET.zip" -d unpacked echo "host=unpacked/mesh-bundle/mesh-llm.exe" >> "$GITHUB_OUTPUT" else (cd dist && { sha256sum -c "mesh-llm-$RELEASE_TAG-$TARGET.tar.gz.sha256" 2>/dev/null || shasum -a 256 -c "mesh-llm-$RELEASE_TAG-$TARGET.tar.gz.sha256"; }) tar -xzf "dist/mesh-llm-$RELEASE_TAG-$TARGET.tar.gz" -C unpacked echo "host=unpacked/mesh-bundle/mesh-llm" >> "$GITHUB_OUTPUT" fi - name: Check the signature of the packaged host env: HOST: ${{ steps.bundle.outputs.host }} CANARY: ${{ inputs.canary }} TARGET: ${{ matrix.target }} run: | set -euo pipefail args=(inspect --binary "$HOST" --json) expected=missing if [[ -s "$MESH_RELEASE_ATTESTATION_PUBLIC_KEY_FILE" ]]; then args+=(--public-key-file "$MESH_RELEASE_ATTESTATION_PUBLIC_KEY_FILE") expected=valid fi summary="$(cargo run --locked --quiet -p mesh-llm-release-attestation -- "${args[@]}")" status="$(jq -r .status <<<"$summary")" echo "release attestation: $status" [[ "$status" == "$expected" ]] || { echo "expected $expected" >&2; exit 1; } [[ "$status" == valid || "$CANARY" == "true" ]] || { echo "a release host must be signed" >&2; exit 1; } if [[ "$status" == valid ]]; then # The signature only says the claims were not altered. Check that # they are the claims this job meant to make. jq -e --arg commit "$MESH_RELEASE_COMMIT" --arg target "$TARGET" --arg version "${RELEASE_TAG#v}" \ '.commit == $commit and .target_triple == $target and .node_version == $version' <<<"$summary" >/dev/null || { echo "signed claims do not match this build: $summary" >&2; exit 1; } fi - name: Check the packaged host's imports, glibc floor and import report env: HOST: ${{ steps.bundle.outputs.host }} run: | set -euo pipefail # Check the unpacked host again, then require the report in the # archive to be the report of this exact host, SHA-256 included. scripts/check-host-imports.sh "$HOST" --report "$RUNNER_TEMP/host-imports.json" diff "$RUNNER_TEMP/host-imports.json" "$(dirname "$HOST")/host-imports.json" - name: Restore the test model if: matrix.target != 'aarch64-unknown-linux-gnu' id: model uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0 with: path: smoke-model.gguf key: smoke-model-${{ env.MODEL_SHA256 }} - name: Download the test model if: matrix.target != 'aarch64-unknown-linux-gnu' && steps.model.outputs.cache-hit != 'true' run: curl -fL --retry 3 --max-time 600 -o smoke-model.gguf "$MODEL_URL" - name: Check the test model if: matrix.target != 'aarch64-unknown-linux-gnu' run: echo "$MODEL_SHA256 smoke-model.gguf" | { sha256sum -c - 2>/dev/null || shasum -a 256 -c -; } # One MeshLLM integration check from the unpacked release archive. # Skippy qualifies inference backends in its own repository. - name: Run inference from the packaged archive if: matrix.target == 'x86_64-unknown-linux-gnu' env: MESH_LLM_BIN: ${{ steps.bundle.outputs.host }} run: | set -euo pipefail scripts/ci-smoke-test.sh unpacked/mesh-bundle/native-runtimes smoke-model.gguf - name: Run macOS and Windows CPU host smokes if: matrix.target == 'aarch64-apple-darwin' || matrix.target == 'x86_64-pc-windows-msvc' run: ${{ matrix.python }} scripts/ci-cpu-host-smoke.py ${{ steps.bundle.outputs.host }} smoke-model.gguf - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: release-${{ matrix.target }} path: dist/* if-no-files-found: error # The three SDKs are separate jobs: each one builds only its own library, # and none of them waits for, or holds up, a host archive. swift_sdk: name: Swift SDK needs: metadata runs-on: macos-15 timeout-minutes: 120 env: RELEASE_TAG: ${{ needs.metadata.outputs.tag }} steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: ./.github/actions/setup - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 with: version: 10.34.5 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24.20.0 package-manager-cache: false - run: scripts/release-version.sh "$RELEASE_TAG" # Builds the console and every Apple target, zips the XCFramework, # verifies it, and writes its URL and checksum into Package.swift. - run: scripts/prepare-swift-package-release.sh "$RELEASE_TAG" - name: Check that all four Apple targets are in the artifact run: scripts/verify-swift-release-artifact.sh dist/MeshLLMFFI.xcframework.zip full - name: Stage what the release publishes and what the tag commit carries run: | set -euo pipefail mkdir -p sdk-swift/assets sdk-swift/source cp dist/MeshLLMFFI.xcframework.zip sdk-swift/assets/ cp Package.swift sdk-swift/source/Package.swift cp mesh/sdk/swift/Sources/MeshLLM/Generated/mesh_ffi.swift sdk-swift/source/mesh_ffi.swift cp -R mesh/crates/mesh-llm-ui/dist sdk-swift/source/console-dist - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: sdk-swift path: sdk-swift if-no-files-found: error kotlin_sdk: name: Kotlin SDK native library (${{ matrix.target }}) needs: metadata strategy: fail-fast: false matrix: include: - { runner: macos-15, target: aarch64-apple-darwin, backend: metal } - { runner: ubuntu-24.04, target: x86_64-unknown-linux-gnu, backend: cpu } - { runner: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu, backend: cpu } runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: RELEASE_TAG: ${{ needs.metadata.outputs.tag }} TARGET: ${{ matrix.target }} BACKEND: ${{ matrix.backend }} steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: ./.github/actions/setup - run: scripts/release-version.sh "$RELEASE_TAG" - name: Build, package and verify the native library run: | set -euo pipefail scripts/package-native-sdk.sh --build --backend "$BACKEND" --target "$TARGET" --profile release --out dist/native-sdk archives=(dist/native-sdk/*.tar.gz) [[ ${#archives[@]} -eq 1 ]] || { echo "expected one native SDK archive, found ${#archives[@]}" >&2; exit 1; } scripts/verify-native-sdk-package.sh "${archives[0]}" mkdir unpacked && tar -xzf "${archives[0]}" -C unpacked [[ "$(jq -r .sdk_version unpacked/*/manifest.json)" == "${RELEASE_TAG#v}" ]] || { echo "the native library is not at ${RELEASE_TAG#v}" >&2; exit 1; } mkdir sdk-kotlin cp "${archives[0]}" "${archives[0]}.sha256" sdk-kotlin/ - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: sdk-kotlin-${{ matrix.target }} path: sdk-kotlin if-no-files-found: error node_sdk: name: Node SDK addon (${{ matrix.target }}) needs: metadata strategy: fail-fast: false matrix: include: - { runner: macos-15, target: darwin-arm64 } - { runner: ubuntu-24.04, target: linux-x64 } - { runner: ubuntu-24.04-arm, target: linux-arm64 } - { runner: windows-2022, target: win32-x64 } runs-on: ${{ matrix.runner }} timeout-minutes: 90 defaults: run: shell: bash env: RELEASE_TAG: ${{ needs.metadata.outputs.tag }} NODE_SDK_TARGET: ${{ matrix.target }} steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: ./.github/actions/setup - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: 24.20.0 package-manager-cache: false - run: scripts/release-version.sh "$RELEASE_TAG" - name: Test, build and stage the addon run: | set -euo pipefail version="${RELEASE_TAG#v}" sha256() { node -e "const fs=require('fs'),c=require('crypto'); console.log(c.createHash('sha256').update(fs.readFileSync(process.argv[1])).digest('hex'))" "$1"; } [[ "$(node -p "require('./mesh/sdk/node/package.json').version")" == "$version" ]] || { echo "the Node SDK package is not at $version" >&2; exit 1; } npm test --prefix mesh/sdk/node npm run build:native --prefix mesh/sdk/node addon="mesh/sdk/node/native/$NODE_SDK_TARGET/mesh_llm_nodejs.node" test -s "$addon" # Install the packed SDK as a consumer would and ask the addon its version. smoke="$(mktemp -d)" mkdir -p "$smoke/tarball" "$smoke/consumer" (cd mesh/sdk/node && npm pack --pack-destination "$smoke/tarball") tarball="$(find "$smoke/tarball" -maxdepth 1 -type f -name '*.tgz' -print -quit)" (cd "$smoke/consumer" && npm init --yes >/dev/null && npm install "$tarball") (cd "$smoke/consumer" && node -e " const actual = require('@mesh-llm/sdk').currentMeshVersion() if (actual !== process.argv[1]) throw new Error('addon reports ' + actual + ', expected ' + process.argv[1]) " "$version") mkdir -p "stage/$NODE_SDK_TARGET" sdk-node cp "$addon" "stage/$NODE_SDK_TARGET/mesh_llm_nodejs.node" printf '{\n "schema": "mesh-llm-node-sdk-addon-v1",\n "version": "%s",\n "target": "%s",\n "file": "mesh_llm_nodejs.node",\n "sha256": "%s"\n}\n' \ "$version" "$NODE_SDK_TARGET" "$(sha256 "$addon")" > "stage/$NODE_SDK_TARGET/manifest.json" archive="mesh-llm-node-sdk-addon-$version-$NODE_SDK_TARGET.tar.gz" tar -C stage -czf "sdk-node/$archive" "$NODE_SDK_TARGET" printf '%s %s\n' "$(sha256 "sdk-node/$archive")" "$archive" > "sdk-node/$archive.sha256" - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: sdk-node-${{ matrix.target }} path: sdk-node if-no-files-found: error publish: name: Publish the GitHub release needs: [release_readiness, metadata, runtime_download_gate, build, swift_sdk, kotlin_sdk, node_sdk] if: ${{ !inputs.canary }} runs-on: ubuntu-24.04 timeout-minutes: 30 permissions: contents: write outputs: tag_commit: ${{ steps.tag.outputs.commit }} env: RELEASE_TAG: ${{ needs.metadata.outputs.tag }} steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ needs.metadata.outputs.source_sha }} persist-credentials: false - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: release-artifacts pattern: release-* merge-multiple: true - name: Verify every archive against its checksum run: | set -euo pipefail cd release-artifacts for target in aarch64-apple-darwin x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu; do test -s "mesh-llm-$RELEASE_TAG-$target.tar.gz" test -s "mesh-llm-$target.tar.gz" done test -s "mesh-llm-$RELEASE_TAG-x86_64-pc-windows-msvc.zip" test -s "mesh-llm-x86_64-pc-windows-msvc.zip" for file in *; do [[ "$file" == *.sha256 ]] && continue test -s "$file.sha256" || { echo "$file has no checksum" >&2; exit 1; } sha256sum -c "$file.sha256" done # One transition release: Vulkan aliases are withheld until Skippy # publishes a matching runtime. The CUDA and ROCm runtimes exist in the # pinned Skippy catalog. - name: Offer supported 0.80.0 GPU archive names run: scripts/create-compatibility-aliases.sh release-artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: sdk-swift path: sdk-swift - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: sdk-artifacts pattern: sdk-{kotlin,node}-* merge-multiple: true - name: Verify the SDK artifacts run: | set -euo pipefail version="${RELEASE_TAG#v}" test -s sdk-swift/assets/MeshLLMFFI.xcframework.zip scripts/verify-swift-package-manifest.sh "$RELEASE_TAG" sdk-swift/assets/MeshLLMFFI.xcframework.zip sdk-swift/source/Package.swift cd sdk-artifacts for target in darwin-arm64 linux-x64 linux-arm64 win32-x64; do test -s "mesh-llm-node-sdk-addon-$version-$target.tar.gz" done for id in darwin-aarch64-metal linux-x86_64-cpu linux-aarch64-cpu; do test -s "meshllm-native-$id.tar.gz" done for file in *; do [[ "$file" == *.sha256 ]] && continue test -s "$file.sha256" || { echo "$file has no checksum" >&2; exit 1; } sha256sum -c "$file.sha256" done cp ./* ../release-artifacts/ cp ../sdk-swift/assets/MeshLLMFFI.xcframework.zip ../release-artifacts/ # Swift Package Manager and the SDK packages read these files from the # tagged source, so the tag is one commit past main: main plus the # Package.swift for this XCFramework, its binding, and the console assets. - name: Push the release tag id: tag env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail existing="$(git ls-remote --tags origin "refs/tags/$RELEASE_TAG")" if [[ -n "$existing" ]]; then echo "Release tag already exists and cannot be reused: $RELEASE_TAG" >&2 exit 1 fi cp sdk-swift/source/Package.swift Package.swift cp sdk-swift/source/mesh_ffi.swift mesh/sdk/swift/Sources/MeshLLM/Generated/mesh_ffi.swift scripts/package-sdk-console-assets.sh --sdk all --skip-build --dist sdk-swift/source/console-dist git add Package.swift mesh/sdk/swift/Sources/MeshLLM/Generated/mesh_ffi.swift git add --force mesh/sdk/node/console mesh/sdk/swift/Sources/MeshLLM/Resources/Console mesh/sdk/kotlin/src/main/resources/mesh-llm/console git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \ commit -m "$RELEASE_TAG: prepare release source" git tag "$RELEASE_TAG" git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "refs/tags/$RELEASE_TAG" echo "commit=$(git rev-parse "refs/tags/${RELEASE_TAG}^{commit}")" >> "$GITHUB_OUTPUT" - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: tag_name: ${{ needs.metadata.outputs.tag }} prerelease: ${{ needs.metadata.outputs.prerelease }} generate_release_notes: true previous_tag: ${{ needs.metadata.outputs.release_notes_base }} overwrite_files: false files: release-artifacts/* # Mesh-LLM/mesh-packaging publishes the container images, the npm package # and the Homebrew assets from a MeshLLM release. # # OFF until mesh-packaging is updated: its images-release.yml downloads # native-runtimes.json from the MeshLLM release and plans GPU images from # the GPU archives listed there. MeshLLM no longer publishes either (they # are Skippy's), so a dispatch today fails on the mesh-packaging side. Set # the repository variable MESH_PACKAGING_DISPATCH=true once it reads the # runtime catalog from the Skippy release. dispatch_packaging_release: name: Dispatch package and image publishing needs: [metadata, publish] if: ${{ vars.MESH_PACKAGING_DISPATCH == 'true' && needs.metadata.outputs.prerelease != 'true' }} runs-on: ubuntu-24.04 timeout-minutes: 10 steps: # The old payload named MeshLLM's own runtime catalog, which no longer # exists. Sending it without that identity would publish packages that # nothing ties to this release, so turning the variable on is an error # until the contract in mesh/docs/design/PACKAGING_HANDOFF.md is in # force on both sides and this job sends it and waits with # scripts/wait-packaging-receipt.sh. - name: Refuse to dispatch without the new contract run: | echo "The mesh-packaging handoff is not wired. See mesh/docs/design/PACKAGING_HANDOFF.md." >&2 exit 1