Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading