Skip to content

docs: 更新版本为v5.0.0 #13

docs: 更新版本为v5.0.0

docs: 更新版本为v5.0.0 #13

Workflow file for this run

name: macOS Build
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
build-macos:
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller==6.5.0
- name: Build with PyInstaller
run: |
pyinstaller build.spec --noconfirm
- name: Prepare bundle
run: |
mkdir -p package
APP_PATH=$(find dist -maxdepth 2 -name "*.app" | head -n 1)
if [ -n "$APP_PATH" ]; then
echo "Found app bundle $APP_PATH"
cp -R "$APP_PATH" package/
else
echo "No .app bundle found, copying dist/FreePDF*"
cp -R dist/FreePDF* package/ || cp -R dist/* package/
fi
cp -R fonts ui pdfjs models pdf2zh_config.json package/
- name: Create DMG
run: |
hdiutil create -volname FreePDF -srcfolder package -ov -format UDZO FreePDF-${{ matrix.arch }}.dmg
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: FreePDF-mac-${{ matrix.arch }}
path: FreePDF-${{ matrix.arch }}.dmg
if-no-files-found: error