ci: harden cross-os release harness on Windows · openclaw/openclaw@57092a1
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -286,7 +286,7 @@ jobs:
|
286 | 286 | env: |
287 | 287 | OUTPUT_DIR: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare |
288 | 288 | run: | |
289 | | - pnpm dlx "tsx@${TSX_VERSION}" workflow/scripts/openclaw-cross-os-release-checks.ts \ |
| 289 | + bash workflow/scripts/github/run-openclaw-cross-os-release-checks.sh \ |
290 | 290 | --prepare-only \ |
291 | 291 | --source-dir source \ |
292 | 292 | --output-dir "${OUTPUT_DIR}" |
@@ -370,7 +370,7 @@ jobs:
|
370 | 370 | VAR_WINDOWS_RUNNER: ${{ vars.OPENCLAW_RELEASE_CHECKS_WINDOWS_RUNNER }} |
371 | 371 | VAR_MACOS_RUNNER: ${{ vars.OPENCLAW_RELEASE_CHECKS_MACOS_RUNNER }} |
372 | 372 | run: | |
373 | | - MATRIX_JSON="$(pnpm dlx "tsx@${TSX_VERSION}" workflow/scripts/openclaw-cross-os-release-checks.ts \ |
| 373 | + MATRIX_JSON="$(bash workflow/scripts/github/run-openclaw-cross-os-release-checks.sh \ |
374 | 374 | --resolve-matrix \ |
375 | 375 | --ref "${INPUT_REF}" \ |
376 | 376 | --mode "${INPUT_MODE}" \ |
@@ -448,7 +448,7 @@ jobs:
|
448 | 448 | if [[ -n "${OPENCLAW_DISCORD_SMOKE_BOT_TOKEN}" ]] && [[ -n "${OPENCLAW_DISCORD_SMOKE_GUILD_ID}" ]] && [[ -n "${OPENCLAW_DISCORD_SMOKE_CHANNEL_ID}" ]]; then |
449 | 449 | DISCORD_ARGS+=(--run-discord-roundtrip true) |
450 | 450 | fi |
451 | | - pnpm dlx "tsx@${TSX_VERSION}" workflow/scripts/openclaw-cross-os-release-checks.ts \ |
| 451 | + bash workflow/scripts/github/run-openclaw-cross-os-release-checks.sh \ |
452 | 452 | --candidate-tgz "${CANDIDATE_TGZ}" \ |
453 | 453 | --candidate-version "${CANDIDATE_VERSION}" \ |
454 | 454 | --source-sha "${SOURCE_SHA}" \ |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +#!/usr/bin/env bash |
| 2 | +set -euo pipefail |
| 3 | + |
| 4 | +tsx_version="${OPENCLAW_RELEASE_TSX_VERSION:-${TSX_VERSION:-4.21.0}}" |
| 5 | +script_path="${OPENCLAW_RELEASE_CHECKS_SCRIPT:-workflow/scripts/openclaw-cross-os-release-checks.ts}" |
| 6 | + |
| 7 | +temp_root="${OPENCLAW_RELEASE_TSX_TOOL_ROOT:-${RUNNER_TEMP:-${TMPDIR:-/tmp}}}" |
| 8 | +if command -v cygpath >/dev/null 2>&1; then |
| 9 | + temp_root="$(cygpath -u "${temp_root}")" |
| 10 | +fi |
| 11 | + |
| 12 | +tool_dir="${OPENCLAW_RELEASE_TSX_TOOL_DIR:-${temp_root}/openclaw-release-tsx-${tsx_version}}" |
| 13 | +loader_path="${tool_dir}/node_modules/tsx/dist/loader.mjs" |
| 14 | + |
| 15 | +if [[ ! -f "${loader_path}" ]]; then |
| 16 | + mkdir -p "${tool_dir}" |
| 17 | + npm install --prefix "${tool_dir}" --no-save --no-package-lock "tsx@${tsx_version}" >/dev/null |
| 18 | +fi |
| 19 | + |
| 20 | +loader_url="$( |
| 21 | + node -e ' |
| 22 | + const { resolve } = require("node:path"); |
| 23 | + const { pathToFileURL } = require("node:url"); |
| 24 | + process.stdout.write(pathToFileURL(resolve(process.argv[1])).href); |
| 25 | + ' "${loader_path}" |
| 26 | +)" |
| 27 | + |
| 28 | +exec node --import "${loader_url}" "${script_path}" "$@" |
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { readFileSync } from "node:fs"; |
| 2 | +import { describe, expect, it } from "vitest"; |
| 3 | + |
| 4 | +const WORKFLOW_PATH = ".github/workflows/openclaw-cross-os-release-checks-reusable.yml"; |
| 5 | +const HARNESS = "bash workflow/scripts/github/run-openclaw-cross-os-release-checks.sh"; |
| 6 | + |
| 7 | +describe("cross-OS release checks workflow", () => { |
| 8 | +it("runs the TypeScript release harness through the Windows-safe wrapper", () => { |
| 9 | +const workflow = readFileSync(WORKFLOW_PATH, "utf8"); |
| 10 | + |
| 11 | +expect(workflow).toContain(HARNESS); |
| 12 | +expect(workflow).not.toContain('pnpm dlx "tsx@${TSX_VERSION}"'); |
| 13 | +}); |
| 14 | +}); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。