ci: cross-publish full NativeAOT matrix from Windows
This commit is contained in:
1 parent
17a69c1c7a
commit
55756f7695
13 files changed
+387
-322
No files matched your search
@@ -26,14 +26,17 @@ printf 'machine %s login justme password %s\n' "$gitea_host" "$GITEA_TOKEN" > "$
|
||||
chmod 600 "$netrc"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
release_body="Agent and Probe builds: Linux glibc and musl (x64, arm64, arm), macOS (x64, arm64), and Windows (x64, arm64). macOS binaries are not Developer ID signed or notarized. Backend OCI images: registry.oeo.one/monitor/monitor-backend:$version (linux/amd64 and linux/arm64)."
|
||||
payload="$(printf '{"tag_name":"%s","target_commitish":"%s","name":"MyMonitor %s","body":"%s","draft":false,"prerelease":false}' \
|
||||
"$tag" "${CI_COMMIT_SHA:-}" "$tag" "$release_body")"
|
||||
release_status="$(curl --silent --show-error --retry 3 --netrc-file "$netrc" \
|
||||
--output "$release_json" --write-out '%{http_code}' "$api/releases/tags/$tag")"
|
||||
release_created=false
|
||||
if [[ "$release_status" == 404 ]]; then
|
||||
payload="$(printf '{"tag_name":"%s","target_commitish":"%s","name":"MyMonitor %s","body":"Agent and Probe archives for Linux and Windows amd64 and arm64. Backend OCI images: registry.oeo.one/monitor/monitor-backend:%s (linux/amd64 and linux/arm64).","draft":false,"prerelease":false}' \
|
||||
"$tag" "${CI_COMMIT_SHA:-}" "$tag" "$version")"
|
||||
release_status="$(curl --silent --show-error --retry 3 --netrc-file "$netrc" \
|
||||
--header 'Content-Type: application/json' --data "$payload" \
|
||||
--output "$release_json" --write-out '%{http_code}' "$api/releases")"
|
||||
release_created=true
|
||||
fi
|
||||
[[ "$release_status" =~ ^2 ]] || {
|
||||
echo "Gitea Release lookup/create failed (HTTP $release_status)" >&2
|
||||
@@ -42,6 +45,17 @@ fi
|
||||
}
|
||||
release_id="$(grep -o '"id":[[:space:]]*[0-9][0-9]*' "$release_json" | head -1 | tr -cd '0-9')"
|
||||
[[ -n "$release_id" ]] || { echo "Could not read Gitea Release ID" >&2; exit 1; }
|
||||
if [[ "$release_created" == false ]]; then
|
||||
update_response="$tmp/release-update.json"
|
||||
update_status="$(curl --silent --show-error --retry 3 --netrc-file "$netrc" \
|
||||
--request PATCH --header 'Content-Type: application/json' --data "$payload" \
|
||||
--output "$update_response" --write-out '%{http_code}' "$api/releases/$release_id")"
|
||||
[[ "$update_status" =~ ^2 ]] || {
|
||||
echo "Gitea Release update failed (HTTP $update_status)" >&2
|
||||
cat "$update_response" >&2
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
curl --fail-with-body --silent --show-error --retry 3 --netrc-file "$netrc" \
|
||||
"$api/releases/$release_id/assets" -o "$assets_json"
|
||||
|
||||
@@ -50,6 +64,18 @@ assets=(
|
||||
"monitor-agent-v$version-linux-arm64.tar.gz"
|
||||
"monitor-probe-v$version-linux-amd64.tar.gz"
|
||||
"monitor-probe-v$version-linux-arm64.tar.gz"
|
||||
"monitor-agent-v$version-linux-arm.tar.gz"
|
||||
"monitor-probe-v$version-linux-arm.tar.gz"
|
||||
"monitor-agent-v$version-linux-musl-amd64.tar.gz"
|
||||
"monitor-probe-v$version-linux-musl-amd64.tar.gz"
|
||||
"monitor-agent-v$version-linux-musl-arm64.tar.gz"
|
||||
"monitor-probe-v$version-linux-musl-arm64.tar.gz"
|
||||
"monitor-agent-v$version-linux-musl-arm.tar.gz"
|
||||
"monitor-probe-v$version-linux-musl-arm.tar.gz"
|
||||
"monitor-agent-v$version-macos-x64.tar.gz"
|
||||
"monitor-probe-v$version-macos-x64.tar.gz"
|
||||
"monitor-agent-v$version-macos-arm64.tar.gz"
|
||||
"monitor-probe-v$version-macos-arm64.tar.gz"
|
||||
"monitor-agent-v$version-windows-amd64.zip"
|
||||
"monitor-agent-v$version-windows-arm64.zip"
|
||||
"monitor-probe-v$version-windows-amd64.zip"
|
||||
|
||||
Reference in new issue
Block a user