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)