diff --git a/ci/release-linux.sh b/ci/release-linux.sh index e4d6d11..15db69a 100644 --- a/ci/release-linux.sh +++ b/ci/release-linux.sh @@ -44,10 +44,18 @@ mkdir -p "$output" "$build_root" "$stage_root" publish_aot() { local name="$1" project="$2" destination="$3" + local openapi_args=() + # The API document is generated from the host executable. During an x64 to + # arm64 cross-publish, that build-time tool cannot run the target binary; + # the checked-in OpenAPI document is already available for this release. + if [[ "$rid" == linux-arm64 && "$name" == backend ]]; then + openapi_args=(-p:OpenApiGenerateDocuments=false) + fi (cd "$root/backend" && dotnet publish "$project" \ -c Release -r "$rid" --self-contained true \ -p:PublishAot=true -p:StripSymbols=true -p:DebugType=none \ -p:ObjCopyName="$objcopy" \ + "${openapi_args[@]}" \ --artifacts-path "$build_root/$name" \ -o "$destination") }