Skip to content

Commit

Permalink
更新 macOS 打包脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyiYo committed Feb 10, 2025
1 parent 06aa929 commit c23695c
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 124 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build-macOS-Apple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build macOS Apple

on:
workflow_dispatch:

jobs:
build-macos-14-arm:
strategy:
matrix:
architecture: [arm64]
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v2

- 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

2 changes: 1 addition & 1 deletion .github/workflows/build-macOS-Intel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build macOS
name: Build macOS Intel

on:
workflow_dispatch:
Expand Down
123 changes: 0 additions & 123 deletions .github/workflows/build-macOS.yml

This file was deleted.

0 comments on commit c23695c

Please sign in to comment.