Skip to content

Commit 38845c2

Browse files
authored
Merge pull request #1 from windyinwind/windyinwind-patch-1
Create macos-release
2 parents 01babb2 + eada9fe commit 38845c2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/macos-release

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build & Release macOS App
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-macos:
9+
name: Build macOS App
10+
runs-on: macos-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pyinstaller
25+
# If you have requirements.txt, uncomment the next line:
26+
pip install -r requirements.txt
27+
28+
- name: Build app with PyInstaller
29+
run: |
30+
pyinstaller --windowed --onefile src/tchMaterial-parser.pyw --name tchMaterial-parser
31+
# The output binary will be in dist/tchMaterial-parser
32+
33+
- name: Create zip archive
34+
run: |
35+
cd dist
36+
zip -r tchMaterial-parser-mac.zip tchMaterial-parser
37+
38+
- name: Upload Release Asset
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
files: dist/tchMaterial-parser-mac.zip
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)