-
-
Notifications
You must be signed in to change notification settings - Fork 40
67 lines (53 loc) · 2.04 KB
/
build-macOS-Intel.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
60
61
62
63
64
65
66
name: Build macOS Intel
on:
workflow_dispatch:
jobs:
build-macos-13-x86_64:
strategy:
matrix:
architecture: [x86_64]
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Remove problematic brew libs
run: |
brew remove --force --ignore-dependencies openssl@3
brew cleanup openssl@3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build with Nuitka
run: |
VERSION=$(python3 -c "from app.common.setting import VERSION; print(VERSION)")
echo "VERSION=${VERSION}" >> $GITHUB_ENV
python deploy.py
chmod u+x "dist/Fluent-M3U8.app/Contents/MacOS/Fluent-M3U8"
rm -rf "dist/Fluent-M3U8.build"
- name: Download and extract tools
run: |
# Setup variables
ZIP_URL="https://github.com/zhiyiYo/Fluent-M3U8-Tools/releases/download/v0.1.0/macOS-${{ matrix.architecture }}.zip"
DEST_DIR="dist/Fluent-M3U8.app/Contents/MacOS"
# Download tools
echo "Downloading package from $ZIP_URL..."
curl -L "$ZIP_URL" -o "/tmp/package.zip"
# unzip
echo "Extracting package..."
unzip -o "/tmp/package.zip" -d "$DEST_DIR"
# delete zip
rm "/tmp/package.zip"
echo "Download and extraction complete!"
- name: Create DMG
run: |
ln -s /Applications dist/Applications
hdiutil create -srcfolder "dist/" -volname "Fluent-M3U8" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m "Fluent-M3U8-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Fluent-M3U8-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}
path: Fluent-M3U8-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg