forked from legendary-gl/legendary
-
Notifications
You must be signed in to change notification settings - Fork 10
94 lines (76 loc) · 1.99 KB
/
Copy pathpython.yml
File metadata and controls
94 lines (76 loc) · 1.99 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Python
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
pyinstaller:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
'windows-2025', 'windows-11-arm',
'macos-15-intel', 'macos-15'
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Dependencies
run: pip3 install --requirement requirements.txt
- name: Build tools
run: pip3 install --upgrade
setuptools
pyinstaller
- name: Optional dependencies (WebView)
run: pip3 install --upgrade pywebview
if: runner.os != 'macOS'
- name: Set strip option on non-Windows
id: strip
run: echo "option=--strip" >> $GITHUB_OUTPUT
if: runner.os != 'Windows'
- name: Build
working-directory: legendary
run: pyinstaller
--onefile
--name legendary
${{ steps.strip.outputs.option }}
-i ../assets/windows_icon.ico
cli.py
env:
PYTHONOPTIMIZE: 1
- uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ runner.arch }}-package
path: legendary/dist/*
zipapp:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
'ubuntu-24.04', 'ubuntu-24.04-arm'
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: mkdir -p build dist
- name: Dependencies
run: pip3 install --requirement requirements.txt --target build
- run: cp -r legendary build
- run: cp zipapp_main.py build/__main__.py
- name: Build
run: python -m zipapp
--output dist/legendary
--python "/usr/bin/env python3"
--compress
build
- uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ runner.arch }}-package
path: dist/*