-
Notifications
You must be signed in to change notification settings - Fork 10
138 lines (138 loc) · 4.09 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
132
133
134
135
136
137
138
name: Build, publish
on:
push:
tags:
- 'v*'
branches:
- '**'
workflow_dispatch:
jobs:
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: 'recursive'
- name: Build in Docker container
uses: addnab/docker-run-action@v2
with:
options: --volume ${{ github.workspace }}:/spelunky --workdir /spelunky
image: dbeef/spelunky-psp
shell: bash
run: ./scripts/build-android.sh
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Spelunky_Android
path: tmp/install-android/Spelunky_PSP.apk
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: 'recursive'
- name: Build in Docker container
uses: addnab/docker-run-action@v2
with:
options: --volume ${{ github.workspace }}:/spelunky --workdir /spelunky
image: dbeef/spelunky-psp
shell: bash
run: ./scripts/config-linux.sh && ./scripts/build-linux.sh
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Spelunky_Linux
path: tmp/install-linux/Release/bin/Spelunky_PSP
build-psp:
name: Build PSP
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: 'recursive'
- name: Build in Docker container
uses: addnab/docker-run-action@v2
with:
options: --volume ${{ github.workspace }}:/spelunky --workdir /spelunky
image: dbeef/spelunky-psp
shell: bash
run: ./scripts/config-psp.sh && ./scripts/build-psp.sh
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Spelunky_PSP
path: tmp/build-psp/EBOOT.PBP
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/dependencies-install.ps1
shell: pwsh
- name: Build
run: ./scripts/config-windows.ps1 ; ./scripts/build-windows.ps1
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Spelunky_Windows
path: tmp/install-windows/Release/bin
publish:
name: Publish
runs-on: ubuntu-latest
needs: [build-android, build-linux, build-psp, build-windows]
if: contains(github.ref, 'refs/tags/')
steps:
- name: Download Artifacts
id: download
uses: actions/download-artifact@v2
- name: Zip Windows
uses: papeloto/action-zip@v1
with:
files: Spelunky_Windows/
dest: Spelunky_Windows/release.zip
- name: Upload PSP
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: Spelunky_PSP/EBOOT.PBP
asset_name: Spelunky_PSP.pbp
overwrite: true
- name: Upload Linux
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: Spelunky_Linux/Spelunky_PSP
asset_name: Spelunky_PSP_Linux
overwrite: true
- name: Upload Windows
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: Spelunky_Windows/release.zip
asset_name: Spelunky_PSP_Windows.zip
overwrite: true
- name: Upload Android
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: Spelunky_Android/Spelunky_PSP.apk
asset_name: Spelunky_PSP_Android.apk
overwrite: true