-
-
Notifications
You must be signed in to change notification settings - Fork 16
78 lines (69 loc) · 2.35 KB
/
macos-apple-sillicon-build.yml
File metadata and controls
78 lines (69 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build and Package for MacOS Apple Silicon
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Download FFmpeg
run: |
curl -L https://evermeet.cx/ffmpeg/ffmpeg-7.1.zip -o ffmpeg.zip
unzip ffmpeg.zip
mv ffmpeg packaging/macos/
rm ffmpeg.zip
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install pyinstaller
pip install "pyobjc-framework-Quartz>=10.3.1,<10.4"
pip install "pyobjc-framework-UniformTypeIdentifiers>=10.3.1,<10.4"
pip install "pyobjc-framework-AVFoundation>=10.3.1,<10.4"
pip install -r requirements.txt
- name: Compile resources
run: |
source venv/bin/activate
cd screenvivid
python compile_resources.py
- name: Build with PyInstaller
run: |
source venv/bin/activate
cd packaging/macos
pyinstaller --clean --noconfirm screenvivid.spec
- name: Install create-dmg
run: |
brew install create-dmg
- name: Create DMG
run: |
cd packaging/macos
create-dmg \
--volname "ScreenVivid" \
--volicon "../../screenvivid/resources/icons/screenvivid.icns" \
--window-pos 0 0 \
--icon-size 100 \
--icon "ScreenVivid.app" 175 120 \
--hide-extension "ScreenVivid.app" \
--app-drop-link 425 120 \
"ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg" \
"dist/ScreenVivid.app"
mv ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg ../..
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
path: ./ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}