From 9e6c9bed08527fcdab6368d9fe4764a7f666edf4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 17:16:06 +0000 Subject: [PATCH] Build macOS Intel on an Intel runner On the ARM macos-14 runner the x64 Python ran natively as arm64, so the Intel job built a second Apple Silicon app with the same name and the release ended up without the Intel dmg. - macOS Intel builds on macos-15-intel - the dmg is named from the architecture of the built executable (lipo) - the release job checks that all five files exist before publishing Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BAXRzRGWDemk9sYyF2v18g --- .github/workflows/release.yml | 12 +++++++++--- build_release.py | 11 ++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c66cac9..fd74710 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: os: macos-14 arch: arm64 - name: macOS Intel - os: macos-14 # x64-Python под Rosetta собирает приложение для Intel + os: macos-15-intel # настоящий Intel: на ARM-машине Python работает как arm64 arch: x64 steps: - uses: actions/checkout@v4 @@ -86,8 +86,14 @@ jobs: path: assets merge-multiple: true - - name: List assets - run: ls -la assets + - name: Check assets + # все пять файлов на месте — иначе релиз не публикуется + run: | + ls -la assets + for f in CineConvert.exe CineConvert-portable.zip CineConvert-linux-x86_64.tar.gz \ + CineConvert-macos-apple-silicon.dmg CineConvert-macos-intel.dmg; do + test -s "assets/$f" || { echo "::error::нет файла $f"; exit 1; } + done - name: Publish release uses: softprops/action-gh-release@v2 diff --git a/build_release.py b/build_release.py index bbaed7f..e31e12a 100644 --- a/build_release.py +++ b/build_release.py @@ -178,7 +178,16 @@ def build_macos(): # после правки Info.plist — заново подписать (ad-hoc): без подписи arm64 не запустится subprocess.run(["codesign", "--force", "--deep", "--sign", "-", app], check=True) fresh_release_dir() - label = "apple-silicon" if arch_name() == "arm64" else "intel" + # имя — по архитектуре, под которую реально собрана программа (а не по машине сборки) + archs = subprocess.run(["lipo", "-archs", app_executable(app)], capture_output=True, + text=True, check=True).stdout.split() + print(">>> Архитектура:", " ".join(archs)) + if archs == ["arm64"]: + label = "apple-silicon" + elif archs == ["x86_64"]: + label = "intel" + else: + label = "universal" dmg = os.path.join(RELEASE, f"{NAME}-macos-{label}.dmg") with tempfile.TemporaryDirectory() as stage: shutil.copytree(app, os.path.join(stage, NAME + ".app"), symlinks=True)