mirror of
https://github.com/happycola233/tchMaterial-parser.git
synced 2026-10-28 14:11:29 +08:00
Merge pull request #39 from windyinwind/feature/attach_macos_app
添加github workflow:发布release后,自动打包macOS应用并上传到release页面
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
name: Build & Release macOS App
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: Build macOS App
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13.3'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyinstaller
|
||||
# If you have requirements.txt, uncomment the next line:
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build app with PyInstaller
|
||||
run: |
|
||||
pyinstaller --windowed src/tchMaterial-parser.pyw --name tchMaterial-parser
|
||||
# The output binary will be in dist/tchMaterial-parser
|
||||
|
||||
- name: Create zip archive
|
||||
run: |
|
||||
cd dist
|
||||
zip -r tchMaterial-parser-mac.zip tchMaterial-parser.app
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/tchMaterial-parser-mac.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
psutil==6.1.0
|
||||
pywin32==308
|
||||
pywin32==308; sys_platform == "win32"
|
||||
requests==2.32.3
|
||||
pyperclip
|
||||
|
||||
Reference in New Issue
Block a user