-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (50 loc) · 1.58 KB
/
release_macos.yml
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
name: 'build macOS release'
on:
workflow_run:
workflows: ["create GitHub release"]
types: [completed]
jobs:
macos:
permissions:
contents: write
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- tool: nope-viewer
tool_fullname: NopeViewer
- tool: nope-diff
tool_fullname: NopeDiff
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install ffmpeg freetype fribidi harfbuzz [email protected] curl pkg-config nasm create-dmg
- name: Setup venv
run: |
$(brew --prefix)/opt/[email protected]/libexec/bin/python configure.py
- name: Build
run: |
make
- name: Build installer
run: |
. venv/bin/ngli-activate
pip install pyinstaller
libarchive=$(brew list libarchive | grep libarchive.[0-9]*.dylib)
pyinstaller \
--collect-all pynopegl_utils \
--add-binary "$(which ffmpeg):bin" \
--add-binary "$(which ffprobe):bin" \
--add-binary "$libarchive:." \
--windowed \
-i scripts/pyinstaller/${{ matrix.tool }}.icns \
scripts/pyinstaller/${{ matrix.tool }}.py
create-dmg ${{ matrix.tool }}.dmg dist/${{ matrix.tool }}.app
- name: Upload DMG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
output_file="${{ matrix.tool_fullname }}-$(cat VERSION)-x86_64.dmg"
mv ${{ matrix.tool }}.dmg $output_file
gh release upload v$(cat VERSION) $output_file