-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (118 loc) · 3.85 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build & Upload
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
web:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
name: "Build & Upload: Web"
steps:
- uses: mymindstorm/setup-emsdk@v12
- name: Verify
run: emcc -v
- uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Make
run: cd web && mkdir bin && make
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./web/bin"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: html
ITCH_GAME: gng-beta
ITCH_USER: crossscardev
PACKAGE: web/gng-web.zip
linux:
runs-on: ubuntu-latest
name: "Build & Upload: Linux"
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: sudo apt update && sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev
- name: Install Ruby (for fpm)
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install fpm
run: gem install fpm
- name: Build with Make
run: cd linux && mkdir bin && make
- name: Publish Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: Dev Build
files: |
linux/gng_0.9.1_amd64.deb
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: gng-beta
ITCH_USER: crossscardev
PACKAGE: linux/gng_0.9.1_amd64.deb
windows:
runs-on: ubuntu-latest
name: "Build & Upload: Windows"
steps:
- uses: actions/checkout@v3
- name: "Install 'quasi-msys2'"
run: |
git clone https://github.com/HolyBlackCat/quasi-msys2
cd quasi-msys2
make install _gcc _SDL2 _SDL2_image _SDL2_ttf
- name: "Build With 'quasi-msys2'"
run: |
cd windows/
mkdir bin/
bash -c 'source ../quasi-msys2/env/all.src && make CC=win-clang++'
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: gng-beta
ITCH_USER: crossscardev
PACKAGE: windows/gng-windows.zip
wiiu:
runs-on: ubuntu-latest
name: "Build & Upload: Wii U"
steps:
- uses: actions/checkout@v3
- name: Build with Docker
run: |
mkdir wiiu/bin/
cp Dockerfile.wiiu Dockerfile
sed -i "s|{workdir}|$(pwd)|g" Dockerfile
sudo docker build -t wiiu-builder .
sudo docker run -v $(pwd):$(pwd) --name wiiu-builder wiiu-builder
sudo docker cp wiiu-builder:$(pwd)/wiiu/bin/gng-wiiu.zip wiiu/bin/gng-wiiu.zip
sudo docker rm -f wiiu-builder
rm -rf Dockerfile
- uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: wiiu
ITCH_GAME: gng-beta
ITCH_USER: crossscardev
PACKAGE: wiiu/bin/gng-wiiu.zip