-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (66 loc) · 2.08 KB
/
build.yaml
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
# Original author: Willem 'Jip' Wijnia
# Licensed with the Mozilla Public License 2.0
# For an overview of what is going on:
# - https://love2d.org/wiki/Game_Distribution
name: Build
env:
GH_TOKEN: ${{ github.token }}
on:
workflow_dispatch:
push:
branches:
- production
jobs:
windows:
# Available tooling on this image:
# - https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: repository
fetch-depth: 1
# https://cli.github.com/manual/gh_run_download
# TODO: determine run number dynamically OR use a valid release version in the future
# TODO: cache it perhaps for now
- name: Retrieve latest version of Love2D (12.0+)
shell: bash
run: |
gh run download 12266724714 --repo "https://github.com/love2d/love" --name "love-windows-x64"
# https://linux.die.net/man/1/unzip
- name: Extract the binaries
shell: bash
run: |
unzip "love-12.0-win64.zip" -d "binaries"
# Remove the intermediate folder
mv binaries/love-12.0-win64/* binaries
rm -d binaries/love-12.0-win64
# https://linux.die.net/man/1/zip
- name: Zip source and rename
shell: bash
working-directory: repository/src
run: |
zip -r build.zip .
mv build.zip ../../build.love
# https://love2d.org/wiki/Game_Distribution
- name: Append source to executable
shell: bash
run: |
cat "binaries/love.exe" "build.love" > "binaries/LOVE-LOUD.exe"
- name: Clean up the binaries folder
working-directory: binaries
shell: bash
run: |
rm "love.exe"
rm "changes.txt"
rm "readme.txt"
rm "game.ico"
rm "love.ico"
rm "lovec.exe"
- name: Upload the binaries
uses: actions/upload-artifact@v4
with:
name: LOUD-LOVE
path: |
binaries