-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (41 loc) · 1.28 KB
/
build-executable.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
name: Build Executables
on: [push]
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Build Windows executable
run: |
pyinstaller --onefile --name="Game" --add-data "Assets;Assets" main.py
- name: Upload Windows executable artifact
uses: actions/upload-artifact@v2
with:
name: Windows-Build
path: dist/Game.exe
build-linux:
runs-on: ubuntu-latest
container:
image: mygame:latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to Docker Hub
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build Linux executable
run: |
# The Docker container will run this command defined in the Dockerfile
- name: Upload Linux executable artifact
uses: actions/upload-artifact@v2
with:
name: Linux-Build
path: dist/Game