You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update release guide with multi-platform matrix strategy
Replace the single-platform release workflow example with a matrix strategy
that produces per-platform artifacts (e.g., engine-linux-x64.tar.gz,
engine-darwin-arm64.tar.gz). This reflects the pattern used in practice where
engines include platform-specific binaries.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/integration-guide.md
+35-7Lines changed: 35 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -909,7 +909,9 @@ git push origin v1.0.0
909
909
910
910
### Release Workflow
911
911
912
-
Add a workflow that triggers on version tags, builds your engine, and attaches the artifact to a GitHub Release.
912
+
Add a workflow that triggers on version tags, builds your engine, and attaches the artifact to a GitHub Release. Because engines may include platform-specific binaries (e.g., native CLI tools or compiled extensions), releases should produce **per-platform artifacts** so the correct binary is available at runtime.
913
+
914
+
Use a **matrix strategy** to build on each target platform and attach a separate tarball per combination (e.g., `engine-linux-x64.tar.gz`, `engine-darwin-arm64.tar.gz`).
913
915
914
916
> **Note:** The example below is for a Node.js/TypeScript engine. If your engine uses a different runtime (Python, Go, Rust, etc.), substitute the appropriate setup, dependency installation, and build steps, and adjust the artifact paths to match your compiled output.
915
917
@@ -927,7 +929,27 @@ permissions:
927
929
928
930
jobs:
929
931
release:
930
-
runs-on: ubuntu-latest
932
+
strategy:
933
+
matrix:
934
+
include:
935
+
- os: ubuntu-latest
936
+
platform: linux
937
+
arch: x64
938
+
- os: ubuntu-latest
939
+
platform: linux
940
+
arch: arm64
941
+
- os: macos-latest
942
+
platform: darwin
943
+
arch: arm64
944
+
- os: macos-13
945
+
platform: darwin
946
+
arch: x64
947
+
- os: windows-latest
948
+
platform: win32
949
+
arch: x64
950
+
951
+
runs-on: ${{ matrix.os }}
952
+
931
953
steps:
932
954
- uses: actions/checkout@v4
933
955
@@ -938,18 +960,24 @@ jobs:
938
960
939
961
- run: npm ci
940
962
941
-
- run: npm run build
963
+
- name: Build
964
+
run: npm run build
965
+
env:
966
+
TARGET_PLATFORM: ${{ matrix.platform }}
967
+
TARGET_ARCH: ${{ matrix.arch }}
942
968
943
969
- name: Create release tarball
944
-
run: tar -czf engine.tar.gz engine.yaml dist/
970
+
run: tar -czf engine-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz engine.yaml dist/
Each matrix job builds for its target platform (using `TARGET_PLATFORM` and `TARGET_ARCH` environment variables) and uploads a named tarball. The result is a single GitHub Release with one artifact per platform.
980
+
953
981
### What to Include in the Release
954
982
955
983
Your release artifact must include `engine.yaml` and everything it references. The `entrypoint` in `engine.yaml` is resolved as a relative path, so any files or directories it points to need to be in the tarball alongside it. For example, if your entrypoint is `node dist/index.js`, then `dist/index.js` (and any of its runtime dependencies) must be present.
0 commit comments