From 7b73e489a7753b39f917d5df885e5cd7f45320bf Mon Sep 17 00:00:00 2001 From: Shoma Nishitateno Date: Wed, 13 May 2026 12:25:09 +0900 Subject: [PATCH] =?UTF-8?q?fix(release):=20electron-builder=20=E3=81=AE=20?= =?UTF-8?q?macOS=20zip=20=E5=87=BA=E5=8A=9B=E5=90=8D=20`Ark-*-arm64-mac.zi?= =?UTF-8?q?p`=20=E3=81=AB=E8=BF=BD=E5=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit electron-builder 25 の macOS zip target は `Ark-{version}-arm64-mac.zip` (`-mac` 接尾辞付き) を出力するが、`Compute artifact metadata` step の glob は `Ark-*-arm64.zip` で `-mac` を含まなかったため `ls: No such file or directory` で fail していた。 glob を `Ark-*-arm64-mac.zip` に揃えて修正。 build run: https://github.com/ignission/claude-code-ark/actions/runs/25776135085 --- .github/workflows/release.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eeff0d7..36c1a29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -279,16 +279,34 @@ jobs: - name: Compute artifact metadata id: artifact - # release/Ark-{version}-arm64.zip の絶対パスと SHA256 を抽出する。 + # electron-builder 25 の macOS zip target はデフォルトで + # `Ark-{version}-arm64-mac.zip` (`-mac` 接尾辞付き) を出力する。 + # 旧 glob `Ark-*-arm64.zip` ではこのファイル名にマッチせず + # `ls: No such file or directory` で fail していたため、 + # `Ark-*-arm64-mac.zip` を期待値として明示する。 + # 同じディレクトリに `.blockmap` も生成されるが拡張子で除外される。 # update-cask ジョブで Caskfile の sha256 を置換するために GITHUB_OUTPUT に書き込む。 run: | set -euo pipefail - ZIP=$(ls packages/desktop/release/Ark-*-arm64.zip | head -n1) - if [[ -z "${ZIP}" ]] || [[ ! -f "${ZIP}" ]]; then + shopt -s nullglob + # 期待 zip は 1 件のみ。0 件 or 2 件以上はビルド設定崩れの兆候として fail させる + # (2 件以上を黙って先頭採用すると意図しない artifact の sha256 を Cask に流す)。 + ZIPS=(packages/desktop/release/Ark-*-arm64-mac.zip) + if [[ "${#ZIPS[@]}" -eq 0 ]]; then echo "::error::Expected zip artifact not found in packages/desktop/release/" ls -la packages/desktop/release/ || true exit 1 fi + if [[ "${#ZIPS[@]}" -gt 1 ]]; then + echo "::error::Multiple zip artifacts matched (count=${#ZIPS[@]}). 期待は 1 件のみ。" + printf ' %s\n' "${ZIPS[@]}" + exit 1 + fi + ZIP="${ZIPS[0]}" + if [[ ! -f "${ZIP}" ]]; then + echo "::error::Matched path is not a regular file: ${ZIP}" + exit 1 + fi SHA=$(shasum -a 256 "${ZIP}" | awk '{print $1}') echo "zip=${ZIP}" >> "${GITHUB_OUTPUT}" echo "sha256=${SHA}" >> "${GITHUB_OUTPUT}"