forked from endless-sky/endless-sky
-
Notifications
You must be signed in to change notification settings - Fork 0
248 lines (237 loc) · 8.06 KB
/
cd_release.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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
name: Release CD
on:
workflow_dispatch:
jobs:
release_appimage_x64:
name: AppImage x64
runs-on: ubuntu-20.04
env:
ARCH: x86_64
OUTPUT: Endless_Sky-${{ github.ref_name }}-x86_64.AppImage
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install dependencies
run: |
sudo rm /etc/apt/sources.list.d/* && sudo dpkg --clear-avail # Speed up installation and get rid of unwanted lists
sudo apt-get update
sudo apt-get install -y --no-install-recommends libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libgles2-mesa-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev
- name: Setup sccache
uses: ./.github/sccache
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'linux-release'
buildPreset: 'linux-ci-release'
- name: Package Application
run: ./utils/build_appimage.sh build/release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
release_windows_x86:
name: Windows x86
runs-on: windows-2022
env:
OUTPUT: EndlessSky-win32-${{ github.ref_name }}.zip
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install x86 MinGW
run: choco install mingw --forcex86 --force
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'mingw32-release'
buildPreset: 'mingw32-ci-release'
- name: Package Application
run: |
cmake --install build/release
7z a ${{ env.OUTPUT }} "./install/release/*"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
- name: Upload Steam Depot
uses: actions/upload-artifact@v3
with:
name: steam-win32-depot
path: |
./install/release/Endless Sky.exe
./install/release/*.dll
release_windows_x64:
name: Windows x64
runs-on: windows-2022
env:
OUTPUT: EndlessSky-win64-${{ github.ref_name }}.zip
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup sccache
uses: ./.github/sccache
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'mingw-release'
buildPreset: 'mingw-ci-release'
- name: Package Application
run: |
cmake --install build/release
7z a ${{ env.OUTPUT }} "./install/release/*"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
- name: Upload Steam Depot
uses: actions/upload-artifact@v3
with:
name: steam-win64-depot
path: |
./install/release/Endless Sky.exe
./install/release/*.dll
release_macos_universal:
name: MacOS Universal
runs-on: macos-12
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT: Endless-Sky-${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup sccache
uses: ./.github/sccache
- name: Install pkg-config
run: type -P pkg-config || brew install pkg-config
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'macos-arm-release'
buildPreset: 'macos-arm-ci-release'
- name: Prepare for x64 app bundle
run: |
mv "build/release/Endless Sky.app" "Endless Sky.app.arm"
rm -rf build/release
- uses: lukka/run-cmake@v10
with:
configurePreset: 'macos-release'
buildPreset: 'macos-ci-release'
- name: Create universal binary
run: |
mv "build/release/Endless Sky.app" "Endless Sky.app.x64"
cp -r "Endless Sky.app.arm" "Endless Sky.app"
lipo -create -output "Endless Sky.app/Contents/MacOS/Endless Sky" "Endless Sky.app.arm/Contents/MacOS/Endless Sky" "Endless Sky.app.x64/Contents/MacOS/Endless Sky"
for lib in "Endless Sky.app/Contents/Frameworks/"*; do lipo -create -output "$lib" "Endless Sky.app.arm/Contents/Frameworks/$(basename "$lib")" "Endless Sky.app.x64/Contents/Frameworks/$(basename "$lib")"; done
- name: Package Application
run: |
mkdir "${{ env.OUTPUT }}"
cp -r "Endless Sky.app" "${{ env.OUTPUT }}"
ln -s /Applications "${{ env.OUTPUT }}"
hdiutil create -ov -fs HFS+ -format UDZO -imagekey zlib-level=9 -srcfolder "${{ env.OUTPUT }}" "${{ github.workspace }}/${{ env.OUTPUT }}.dmg"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OUTPUT }}.dmg
path: ${{ env.OUTPUT }}.dmg
- name: Prepare Steam Depot
run: |
mv "Endless Sky.app/Contents/Resources/endless-sky.icns" .
rm -rf "Endless Sky.app/Contents/Resources"
mkdir "Endless Sky.app/Contents/Resources"
mv endless-sky.icns "Endless Sky.app/Contents/Resources"
mkdir depot/
mv "Endless Sky.app/" depot/
- name: Upload Steam Depot
uses: actions/upload-artifact@v3
with:
name: steam-macos-depot
path: depot
release_steam_linux:
name: Steam Linux
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, x86]
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Build Endless Sky
run: |
cd steam
docker-compose run steam-${{ matrix.arch }}
- name: Prepare binary
run: cp build/steam-${{ matrix.arch }}/endless-sky .
- name: Upload Steam Depot
uses: actions/upload-artifact@v3
with:
name: steam-linux${{ matrix.arch == 'x64' && '64' || '32' }}-depot
path: endless-sky
deploy_steam:
name: Deploy Steam
needs: [release_steam_linux, release_windows_x64, release_windows_x86, release_macos_universal]
runs-on: ubuntu-latest
# environment: steam
env:
data: steam-data-depot
linux32: steam-linux-x86
linux64: steam-linux-x64
win32: steam-win32
win64: steam-win64
macos: steam-macos
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Upload Steam Data Depot
uses: actions/upload-artifact@v3
with:
name: ${{ env.data }}
path: |
changelog
copyright
credits.txt
icon.png
keys.txt
license.txt
data/
images/
sounds/
# - uses: game-ci/steam-deploy@v1
# with:
# appId: 404410
# buildDescription: canary-${{ github.sha }}
# username: ${{ secrets.STEAM_DEPLOY_UN }}
# password: ${{ secrets.STEAM_DEPLOY_PW }}
# configVdf: ${{ secrets.STEAM_DEPLOY_VDF }}
# ssfnFileName: ${{ secrets.STEAM_DEPLOY_SSFN_NAME }}
# ssfnFileContents: ${{ secrets.STEAM_DEPLOY_SSFN }}
# rootPath: ''
# depot1Path: ${{ env.data }}
# depot3Path: ${{ env.win32 }}
# depot4Path: ${{ env.win64 }}
# depot5Path: ${{ env.macos }}
# depot6Path: ${{ env.linux32 }}
# depot7Path: ${{ env.linux64 }}
# releaseBranch: canary