Skip to content

Build Temporal Core SDK artifacts #30

Build Temporal Core SDK artifacts

Build Temporal Core SDK artifacts #30

name: Build Temporal Core SDK artifacts
on:
workflow_dispatch:
env:
RUST_VERSION: "1.88"
ARTIFACT_BUNDLE_NAME: "temporal.artifactbundle"
XCFRAMEWORK_NAME: "temporal.xcframework"
HEADER_SOURCE: "dependencies/sdk-core/core-c-bridge/include/temporal-sdk-core-c-bridge.h"
TEMPORAL_BUILT_LIB_NAME: "libtemporal_sdk_core_c_bridge.a"
RUST_PROJECT_DIR: "dependencies/sdk-core/core-c-bridge"
jobs:
setup:
name: Setup release
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create_release.outputs.id }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
core_sha: ${{ steps.get_sha.outputs.sha }}
core_sha_short: ${{ steps.get_sha.outputs.sha_short }}
release_tag: ${{ steps.create_release.outputs.release_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get Core SDK commit SHA
id: get_sha
run: |
cd dependencies/sdk-core
CORE_SHA=$(git rev-parse HEAD)
CORE_SHA_SHORT=$(git rev-parse --short HEAD)
BASE_RELEASE_TAG="temporal-sdk-core-${CORE_SHA_SHORT}"
echo "sha=${CORE_SHA}" >> $GITHUB_OUTPUT
echo "sha_short=${CORE_SHA_SHORT}" >> $GITHUB_OUTPUT
echo "base_tag=${BASE_RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "Core SDK SHA: ${CORE_SHA}"
echo "Base release tag: ${BASE_RELEASE_TAG}"
# Validate submodule is clean
if [[ -n $(git status --porcelain) ]]; then
echo "Error: Core SDK submodule has uncommitted changes"
exit 1
fi
- name: Find available release tag
id: find_tag
run: |
BASE_TAG="${{ steps.get_sha.outputs.base_tag }}"
# Check if base tag exists
if ! gh release view "${BASE_TAG}" >/dev/null 2>&1; then
echo "tag=${BASE_TAG}" >> $GITHUB_OUTPUT
echo "✅ Using base tag: ${BASE_TAG}"
exit 0
fi
# Find next available suffix
SUFFIX=1
while true; do
CANDIDATE_TAG="${BASE_TAG}-${SUFFIX}"
if ! gh release view "${CANDIDATE_TAG}" >/dev/null 2>&1; then
echo "tag=${CANDIDATE_TAG}" >> $GITHUB_OUTPUT
echo "✅ Using suffixed tag: ${CANDIDATE_TAG}"
break
fi
((SUFFIX++))
# Safety check to prevent infinite loop
if [ $SUFFIX -gt 999 ]; then
echo "Error: Too many existing releases for this commit"
exit 1
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release notes
run: |
cat > release_notes.md << 'EOF'
Pre-built binaries for Temporal Core SDK at commit https://github.com/temporalio/sdk-core/tree/${{ steps.get_sha.outputs.sha }}.
## Assets
- **temporal.artifactbundle.zip** - Artifact bundle
- **temporal.xcframework.zip** - XCFramework
EOF
- name: Create draft release
id: create_release
run: |
RELEASE_TAG="${{ steps.find_tag.outputs.tag }}"
gh release create "${RELEASE_TAG}" \
--title "Temporal Core SDK v${{ steps.get_sha.outputs.sha_short }}" \
--notes-file release_notes.md \
--draft \
--latest=false
# Get release details
RELEASE_DATA=$(gh release view "${RELEASE_TAG}" --json id,uploadUrl)
RELEASE_ID=$(echo "$RELEASE_DATA" | jq -r '.id')
UPLOAD_URL=$(echo "$RELEASE_DATA" | jq -r '.uploadUrl')
echo "id=${RELEASE_ID}" >> $GITHUB_OUTPUT
echo "upload_url=${UPLOAD_URL}" >> $GITHUB_OUTPUT
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "Created draft release: ${RELEASE_TAG}"
echo "Release ID: ${RELEASE_ID}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
name: Build macOS static libraries
runs-on: [self-hosted, macos]
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protoc
run: |
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v32.1/protoc-32.1-osx-universal_binary.zip
unzip protoc-32.1-osx-universal_binary.zip -d $HOME/.local
export PATH="$PATH:$HOME/.local/bin"
- name: Install rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup install ${{ env.RUST_VERSION }}
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add aarch64-apple-ios
rustup target add x86_64-apple-ios
rustup target add aarch64-apple-ios-sim
- name: Build macOS x86_64
run: |
export PATH="$PATH:$HOME/.local/bin"
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
MACOSX_DEPLOYMENT_TARGET="15" \
IPHONEOS_DEPLOYMENT_TARGET="18" \
TVOS_DEPLOYMENT_TARGET="18" \
WATCHOS_DEPLOYMENT_TARGET="11" \
cargo rustc \
--release \
--target x86_64-apple-darwin \
--features xz2-static \
--crate-type=staticlib
- name: Build macOS arm64
run: |
export PATH="$PATH:$HOME/.local/bin"
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
MACOSX_DEPLOYMENT_TARGET="15" \
IPHONEOS_DEPLOYMENT_TARGET="18" \
TVOS_DEPLOYMENT_TARGET="18" \
WATCHOS_DEPLOYMENT_TARGET="11" \
cargo rustc \
--release \
--target aarch64-apple-darwin \
--features xz2-static \
--crate-type=staticlib
- name: Build iOS arm64
run: |
export PATH="$PATH:$HOME/.local/bin"
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
MACOSX_DEPLOYMENT_TARGET="15" \
IPHONEOS_DEPLOYMENT_TARGET="18" \
TVOS_DEPLOYMENT_TARGET="18" \
WATCHOS_DEPLOYMENT_TARGET="11" \
cargo rustc \
--release \
--target aarch64-apple-ios \
--features xz2-static \
--crate-type=staticlib
- name: Build iOS x86_64 simulator
run: |
export PATH="$PATH:$HOME/.local/bin"
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
MACOSX_DEPLOYMENT_TARGET="15" \
IPHONEOS_DEPLOYMENT_TARGET="18" \
TVOS_DEPLOYMENT_TARGET="18" \
WATCHOS_DEPLOYMENT_TARGET="11" \
cargo rustc \
--release \
--target x86_64-apple-ios \
--features xz2-static \
--crate-type=staticlib
- name: Build iOS arm64 simulator
run: |
export PATH="$PATH:$HOME/.local/bin"
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
MACOSX_DEPLOYMENT_TARGET="15" \
IPHONEOS_DEPLOYMENT_TARGET="18" \
TVOS_DEPLOYMENT_TARGET="18" \
WATCHOS_DEPLOYMENT_TARGET="11" \
cargo rustc \
--release \
--target aarch64-apple-ios-sim \
--features xz2-static \
--crate-type=staticlib
- name: Create fat library
run: |
X86_64_LIB="dependencies/sdk-core/target/x86_64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}"
ARM64_LIB="dependencies/sdk-core/target/aarch64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}"
if [[ ! -f "${X86_64_LIB}" ]]; then
echo "Error: x86_64 library not found: ${X86_64_LIB}"
exit 1
fi
if [[ ! -f "${ARM64_LIB}" ]]; then
echo "Error: arm64 library not found: ${ARM64_LIB}"
exit 1
fi
lipo -create "${X86_64_LIB}" "${ARM64_LIB}" -output "libtemporal_fat.a"
echo "✅ Fat library created: libtemporal_fat.a"
- name: Create all platform fat libraries
run: |
# Create fat libraries for each platform
echo "Creating fat libraries for each Apple platform..."
# macOS - already created above
echo "✅ macOS fat library: libtemporal_fat.a"
# iOS device
lipo -create \
"dependencies/sdk-core/target/aarch64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
-output "libtemporal_ios.a"
echo "✅ iOS device library: libtemporal_ios.a"
# iOS simulator
lipo -create \
"dependencies/sdk-core/target/x86_64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"dependencies/sdk-core/target/aarch64-apple-ios-sim/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
-output "libtemporal_ios_sim.a"
echo "✅ iOS simulator library: libtemporal_ios_sim.a"
- name: Create XCFramework
run: |
# Create temporary directories for each platform
mkdir -p temp_macos/Headers
mkdir -p temp_ios/Headers
mkdir -p temp_ios_sim/Headers
# Copy libraries and headers to each platform directory
cp "libtemporal_fat.a" "temp_macos/libTemporal.a"
cp "libtemporal_ios.a" "temp_ios/libTemporal.a"
cp "libtemporal_ios_sim.a" "temp_ios_sim/libTemporal.a"
# Copy headers to all platform directories
for dir in temp_*/Headers; do
cp "${{ env.HEADER_SOURCE }}" "$dir/temporal.h"
cp "dependencies/sdk-core/LICENSE.txt" "$dir/LICENSE.txt"
cat > "$dir/module.modulemap" << 'EOF'
module Bridge {
header "temporal.h"
export *
}
EOF
done
# Create XCFramework using xcodebuild
xcodebuild -create-xcframework \
-library "temp_macos/libTemporal.a" -headers "temp_macos/Headers" \
-library "temp_ios/libTemporal.a" -headers "temp_ios/Headers" \
-library "temp_ios_sim/libTemporal.a" -headers "temp_ios_sim/Headers" \
-output "${{ env.XCFRAMEWORK_NAME }}"
# Clean up temporary files
rm -rf temp_*
rm -f libtemporal_*.a
echo "✅ XCFramework created: ${{ env.XCFRAMEWORK_NAME }}"
- name: Upload macOS artifacts for bundle assembly
uses: actions/upload-artifact@v4
with:
name: macos-libraries
path: |
dependencies/sdk-core/target/x86_64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
dependencies/sdk-core/target/aarch64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
dependencies/sdk-core/target/aarch64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
dependencies/sdk-core/target/x86_64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
dependencies/sdk-core/target/aarch64-apple-ios-sim/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
${{ env.XCFRAMEWORK_NAME }}
retention-days: 1
build-linux-x86:
name: Build Linux x86_64
runs-on: ubuntu-24.04
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protoc
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq protobuf-compiler
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup install ${{ env.RUST_VERSION }}
- name: Build Linux x86_64
run: |
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
cargo rustc \
--release \
--target x86_64-unknown-linux-gnu \
--features xz2-static \
--crate-type=staticlib
- name: Upload Linux x86_64 artifacts
uses: actions/upload-artifact@v4
with:
name: linux-x86-libraries
path: dependencies/sdk-core/target/x86_64-unknown-linux-gnu/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
retention-days: 1
build-linux-arm:
name: Build Linux ARM64
runs-on: ubuntu-24.04-arm
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protoc
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq protobuf-compiler
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup install ${{ env.RUST_VERSION }}
- name: Build Linux ARM64
run: |
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
cargo rustc \
--release \
--target aarch64-unknown-linux-gnu \
--features xz2-static \
--crate-type=staticlib
- name: Upload Linux ARM64 artifacts
uses: actions/upload-artifact@v4
with:
name: linux-arm-libraries
path: dependencies/sdk-core/target/aarch64-unknown-linux-gnu/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
retention-days: 1
build-linux-musl-x86:
name: Build Linux MUSL x86_64
runs-on: ubuntu-24.04
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protoc
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq protobuf-compiler
- name: Install MUSL tools
run: |
sudo apt-get install -y -qq musl-tools musl-dev
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup install ${{ env.RUST_VERSION }}
rustup target add x86_64-unknown-linux-musl
- name: Build Linux MUSL x86_64
run: |
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
cargo rustc \
--release \
--target x86_64-unknown-linux-musl \
--features xz2-static \
--crate-type=staticlib
- name: Upload Linux MUSL x86_64 artifacts
uses: actions/upload-artifact@v4
with:
name: linux-musl-x86-libraries
path: dependencies/sdk-core/target/x86_64-unknown-linux-musl/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
retention-days: 1
build-linux-musl-arm:
name: Build Linux MUSL ARM64
runs-on: ubuntu-24.04-arm
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install protoc
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq protobuf-compiler
- name: Install MUSL tools
run: |
sudo apt-get install -y -qq musl-tools musl-dev
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup install ${{ env.RUST_VERSION }}
rustup target add aarch64-unknown-linux-musl
- name: Build Linux MUSL ARM64
run: |
. "$HOME/.cargo/env"
cd ${{ env.RUST_PROJECT_DIR }}
cargo rustc \
--release \
--target aarch64-unknown-linux-musl \
--features xz2-static \
--crate-type=staticlib
- name: Upload Linux MUSL ARM64 artifacts
uses: actions/upload-artifact@v4
with:
name: linux-musl-arm-libraries
path: dependencies/sdk-core/target/aarch64-unknown-linux-musl/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}
retention-days: 1
assemble-bundle:
name: Assemble artifact bundle
runs-on: ubuntu-latest
needs: [setup, build-macos, build-linux-x86, build-linux-arm, build-linux-musl-x86, build-linux-musl-arm]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download all platform artifacts
uses: actions/download-artifact@v4
- name: Reconstruct build structure
run: |
# List downloaded artifacts to debug
echo "📁 Downloaded artifacts:"
find macos-libraries/ -type f -name "*" || echo "macos-libraries not found"
find linux-x86-libraries/ -type f -name "*" || echo "linux-x86-libraries not found"
find linux-arm-libraries/ -type f -name "*" || echo "linux-arm-libraries not found"
find linux-musl-x86-libraries/ -type f -name "*" || echo "linux-musl-x86-libraries not found"
find linux-musl-arm-libraries/ -type f -name "*" || echo "linux-musl-arm-libraries not found"
# The artifacts already contain the full directory structure
# Just copy them to the current directory
if [ -d "macos-libraries/dependencies" ]; then
cp -r macos-libraries/dependencies .
echo "✅ Copied macOS libraries with directory structure"
else
echo "Error: macOS libraries not found in expected structure"
exit 1
fi
# Create Linux target directories and copy Linux libraries
mkdir -p dependencies/sdk-core/target/x86_64-unknown-linux-gnu/release
mkdir -p dependencies/sdk-core/target/aarch64-unknown-linux-gnu/release
mkdir -p dependencies/sdk-core/target/x86_64-unknown-linux-musl/release
mkdir -p dependencies/sdk-core/target/aarch64-unknown-linux-musl/release
if [ -f "linux-x86-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }}" ]; then
cp linux-x86-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }} \
dependencies/sdk-core/target/x86_64-unknown-linux-gnu/release/
echo "✅ Copied Linux x86_64 library"
else
echo "Error: Linux x86_64 library not found"
exit 1
fi
if [ -f "linux-arm-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }}" ]; then
cp linux-arm-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }} \
dependencies/sdk-core/target/aarch64-unknown-linux-gnu/release/
echo "✅ Copied Linux ARM64 library"
else
echo "Error: Linux ARM64 library not found"
exit 1
fi
if [ -f "linux-musl-x86-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }}" ]; then
cp linux-musl-x86-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }} \
dependencies/sdk-core/target/x86_64-unknown-linux-musl/release/
echo "✅ Copied Linux MUSL x86_64 library"
else
echo "Error: Linux MUSL x86_64 library not found"
exit 1
fi
if [ -f "linux-musl-arm-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }}" ]; then
cp linux-musl-arm-libraries/${{ env.TEMPORAL_BUILT_LIB_NAME }} \
dependencies/sdk-core/target/aarch64-unknown-linux-musl/release/
echo "✅ Copied Linux MUSL ARM64 library"
else
echo "Error: Linux MUSL ARM64 library not found"
exit 1
fi
echo "✅ Build structure reconstructed"
- name: Create artifact bundle structure
run: |
rm -rf "${{ env.ARTIFACT_BUNDLE_NAME }}"
mkdir -p "${{ env.ARTIFACT_BUNDLE_NAME }}/temporal"
mkdir -p "${{ env.ARTIFACT_BUNDLE_NAME }}/include"
- name: Setup headers and module map
run: |
# Copy and rename header file
cp "${{ env.HEADER_SOURCE }}" "${{ env.ARTIFACT_BUNDLE_NAME }}/include/temporal.h"
# Copy license file
cp "dependencies/sdk-core/LICENSE.txt" "${{ env.ARTIFACT_BUNDLE_NAME }}/include/LICENSE.txt"
# Create module map with correct header reference
cat > "${{ env.ARTIFACT_BUNDLE_NAME }}/include/module.modulemap" << 'EOF'
module Bridge {
header "temporal.h"
export *
}
EOF
- name: Copy platform libraries to bundle
run: |
# Copy all platform libraries to bundle
# macOS
cp "dependencies/sdk-core/target/x86_64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-macos-x86_64.a"
cp "dependencies/sdk-core/target/aarch64-apple-darwin/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-macos-arm64.a"
# iOS
cp "dependencies/sdk-core/target/aarch64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-ios-arm64.a"
cp "dependencies/sdk-core/target/x86_64-apple-ios/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-ios-x86_64.a"
cp "dependencies/sdk-core/target/aarch64-apple-ios-sim/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-ios-sim-arm64.a"
# Linux
cp "dependencies/sdk-core/target/x86_64-unknown-linux-gnu/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-linux-x86_64.a"
cp "dependencies/sdk-core/target/aarch64-unknown-linux-gnu/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-linux-arm64.a"
# Linux MUSL
cp "dependencies/sdk-core/target/x86_64-unknown-linux-musl/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-linux-musl-x86_64.a"
cp "dependencies/sdk-core/target/aarch64-unknown-linux-musl/release/${{ env.TEMPORAL_BUILT_LIB_NAME }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}/temporal/libTemporal-linux-musl-arm64.a"
- name: Generate artifact bundle manifest
run: |
cat > "${{ env.ARTIFACT_BUNDLE_NAME }}/info.json" << 'EOF'
{
"schemaVersion": "1.0",
"artifacts": {
"CTemporal": {
"type": "staticLibrary",
"version": "1.0.0",
"variants": [
{
"path": "temporal/libTemporal-macos-x86_64.a",
"supportedTriples": ["x86_64-apple-macosx"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-macos-arm64.a",
"supportedTriples": ["arm64-apple-macosx"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-ios-arm64.a",
"supportedTriples": ["arm64-apple-ios"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-ios-x86_64.a",
"supportedTriples": ["x86_64-apple-ios"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-ios-sim-arm64.a",
"supportedTriples": ["arm64-apple-ios-simulator"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-linux-x86_64.a",
"supportedTriples": ["x86_64-unknown-linux-gnu"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-linux-arm64.a",
"supportedTriples": ["aarch64-unknown-linux-gnu"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-linux-musl-x86_64.a",
"supportedTriples": ["x86_64-linux-musl"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
},
{
"path": "temporal/libTemporal-linux-musl-arm64.a",
"supportedTriples": ["aarch64-linux-musl"],
"staticLibraryMetadata": {
"headerPaths": ["include"],
"moduleMapPath": "include/module.modulemap"
}
}
]
}
}
}
EOF
- name: Create archive
run: |
zip -r "${{ env.ARTIFACT_BUNDLE_NAME }}.zip" "${{ env.ARTIFACT_BUNDLE_NAME }}"
echo "✅ Artifact archive created: ${{ env.ARTIFACT_BUNDLE_NAME }}.zip"
echo "📊 Archive size: $(du -h "${{ env.ARTIFACT_BUNDLE_NAME }}.zip" | cut -f1)"
- name: Upload artifact bundle to release
run: |
gh release upload "${{ needs.setup.outputs.release_tag }}" \
"${{ env.ARTIFACT_BUNDLE_NAME }}.zip" \
--clobber
echo "✅ Artifact bundle uploaded to release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package and upload XCFramework
run: |
# Copy XCFramework to root level for proper zip structure
cp -r "macos-libraries/${{ env.XCFRAMEWORK_NAME }}" .
zip -r "${{ env.XCFRAMEWORK_NAME }}.zip" "${{ env.XCFRAMEWORK_NAME }}"
gh release upload "${{ needs.setup.outputs.release_tag }}" \
"${{ env.XCFRAMEWORK_NAME }}.zip" \
--clobber
echo "✅ XCFramework uploaded to release"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Print summary
run: |
echo "🎉 Build completed successfully!"
echo ""
echo "📋 Release Details:"
echo " Tag: ${{ needs.setup.outputs.release_tag }}"
echo " Core SHA: ${{ needs.setup.outputs.core_sha }}"
echo ""
echo "📝 Review and publish the draft release when ready!"