-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.32 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
name: Build Windows & macOS Apps
on:
push:
branches: ['main']
jobs:
build:
name: Build Application
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- os: windows-latest
TARGET: Windows
ARTIFACT_NAME: LDJam55_Windows
OUT_FILE_NAME: LDJam55.exe
CMD_BUILD: pyinstaller -F -w -n LDJam55 --add-data "assets;assets" src/main.py
- os: macos-12
TARGET: macOS
ARTIFACT_NAME: LDJam55_macOS_x86
OUT_FILE_NAME: LDJam55.app
CMD_BUILD: >
pyinstaller -F -w -n LDJam55 --osx-bundle-identifier "com.github.jmatcj.ld55" --add-data "assets:assets" src/main.py &&
cd dist/ &&
zip -r9 LDJam55 LDJam55.app/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build ${{matrix.TARGET}} App
run: ${{matrix.CMD_BUILD}}
- name: Upload App
uses: actions/upload-artifact@v4
with:
name: ${{matrix.ARTIFACT_NAME}}
path: ./dist/${{matrix.OUT_FILE_NAME}}