-
Notifications
You must be signed in to change notification settings - Fork 10
66 lines (62 loc) · 1.78 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
name: Build Python Binaries
on:
workflow_dispatch: # manual
release:
types: [published] # published releases only
schedule:
- cron: '0 0 1 * *' # once a month
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Linux Binary
uses: eric2788/pyinstaller-build@master
with:
main: happy/main
artifact: happy
use-dependencies: true
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: happy_linux
path: dist
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build Windows Exe
uses: eric2788/pyinstaller-build@master
with:
main: happy/main
artifact: happy
use-dependencies: true
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: happy_windows
path: dist
build_macos:
runs-on: macos-latest
steps:
# Check-out repository
- uses: actions/checkout@v3
# Setup Python
- uses: actions/setup-python@v4
with:
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Build MacOS Binary
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pyinstaller -y --name happy --onefile "happy/main.py"
chmod 770 "./dist"
# Uploads artifact
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: happy_macos
path: dist