-
Notifications
You must be signed in to change notification settings - Fork 11
98 lines (82 loc) · 2.56 KB
/
build.yml
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
95
96
97
98
name: Build
on: [push]
permissions:
contents: write
jobs:
build_windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache dependencies
uses: actions/cache@v4
if: startsWith(runner.os, 'Windows')
with:
path: |
~\AppData\Local\pip\Cache
${{ env.GITHUB_WORKSPACE }}\.hatch\Lib\site-packages
key: win-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
win-pip-
- name: Install build dependencies
run: pip install hatch
- name: Setup build environment
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: |
hatch -v env create
hatch run pip install pyinstaller
hatch run wavebin -h
- name: Build wheel
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: hatch -v build
- name: Build exe
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: hatch run pyinstaller --clean wavebin/wavebin_win.spec
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wavebin.whl
path: dist/wavebin-*-py3-none-any.whl
retention-days: 1
- name: Upload exe
uses: actions/upload-artifact@v4
with:
name: wavebin.exe
path: dist/wavebin.exe
retention-days: 1
build_macos_intel:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache dependencies
uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: |
~/Library/Caches/pip
${{ env.GITHUB_WORKSPACE }}\.hatch\Lib\site-packages
key: macos-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
macos-pip-
- name: Install build dependencies
run: pip install hatch
- name: Setup build environment
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: |
hatch -v env create
hatch run pip install pyinstaller pillow
hatch run wavebin -h
- name: Build app
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: hatch run pyinstaller --clean wavebin/wavebin_macos.spec
- name: Upload app
uses: actions/upload-artifact@v4
with:
name: wavebin.app
path: dist/wavebin.app
retention-days: 1