-
Notifications
You must be signed in to change notification settings - Fork 0
269 lines (227 loc) · 11.5 KB
/
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
name: Release
on:
push: # Trigger on new version tags
tags:
- v[0-9]+.[0-9]+.[0-9]+
# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
# will be cancelled automatically to conserve resources.
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
# Necessary permissions to create a release.
permissions:
contents: write
jobs:
software:
uses: joeyparrish/kinetoscope/.github/workflows/build-software.yaml@main
with:
ref: ${{ github.ref }}
for-release: true
firmware:
uses: joeyparrish/kinetoscope/.github/workflows/build-firmware.yaml@main
with:
ref: ${{ github.ref }}
for-release: true
hardware:
uses: joeyparrish/kinetoscope/.github/workflows/build-hardware.yaml@main
with:
ref: ${{ github.ref }}
for-release: true
emulators:
uses: joeyparrish/kinetoscope/.github/workflows/build-emulators.yaml@main
with:
ref: ${{ github.ref }}
for-release: true
release:
needs:
- software
- firmware
- hardware
- emulators
name: Compile Release
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
path: source
- name: Pull Never Gonna Give You Up ROM
uses: actions/download-artifact@v4
with:
name: never-gonna-give-you-up-rom
path: kinetoscope-never-gonna-give-you-up-rom
- name: Pull You Spin Me Round ROM
uses: actions/download-artifact@v4
with:
name: you-spin-me-round-rom
path: kinetoscope-you-spin-me-round-rom
- name: Pull streamer ROM
uses: actions/download-artifact@v4
with:
name: streamer-rom
path: kinetoscope-streamer-rom
- name: Pull self-test ROM
uses: actions/download-artifact@v4
with:
name: self-test-rom
path: kinetoscope-self-test-rom
- name: Pull firmware
uses: actions/download-artifact@v4
with:
name: firmware
path: kinetoscope-firmware
- name: Pull hardware
uses: actions/download-artifact@v4
with:
name: hardware
path: kinetoscope-hardware
- name: Pull BlastEm for Linux
uses: actions/download-artifact@v4
with:
name: blastem-linux
path: kinetoscope-blastem-0.6.2-linux-x64
- name: Pull BlastEm for Windows
uses: actions/download-artifact@v4
with:
name: blastem-windows
path: kinetoscope-blastem-0.6.2-windows-x64
- name: Pull BlastEm for macOS
uses: actions/download-artifact@v4
with:
name: blastem-macos
path: kinetoscope-blastem-0.6.2-macos-x64
- name: Pull Genesis Plus GX for Web
uses: actions/download-artifact@v4
with:
name: genesis-plus-gx-web
path: kinetoscope-genesis-plus-gx-web
- name: Arrange release artifacts
run: |
# Debug: show everything we execute.
set -x
# Debug: show all downloaded artifacts.
find -ls
VERSION=$( echo ${{ github.ref }} | sed -e 's@refs/tags/@@' )
# Prep encoder.
mkdir kinetoscope-$VERSION-encoder/
cp source/encoder/encode_sega_video.py kinetoscope-$VERSION-encoder/
cp source/server/generate_catalog.py kinetoscope-$VERSION-encoder/
cp source/LICENSE.txt kinetoscope-$VERSION-encoder/
echo "These Python 3 scripts, with the help of FFmpeg, generates videos that can be played back on a Sega Genesis / Mega Drive with Kinetoscope." >> kinetoscope-$VERSION-encoder/README.txt
zip -r9 kinetoscope-$VERSION-encoder.zip kinetoscope-$VERSION-encoder/
# Prep player source.
cp -a source/software/player/ kinetoscope-$VERSION-player
cp source/LICENSE.txt kinetoscope-$VERSION-player/
zip -r9 kinetoscope-$VERSION-player.zip kinetoscope-$VERSION-player/
# Prep Never Gonna Give You Up ROM.
mv kinetoscope-never-gonna-give-you-up-rom/rom.bin kinetoscope-never-gonna-give-you-up-rom/kinetoscope-never-gonna-give-you-up.rom
cp source/LICENSE.txt kinetoscope-never-gonna-give-you-up-rom/
echo "This Kinetoscope demo ROM will run on any system or emulator." >> kinetoscope-never-gonna-give-you-up-rom/README.txt
mv kinetoscope-never-gonna-give-you-up-rom kinetoscope-$VERSION-never-gonna-give-you-up-rom
zip -r9 kinetoscope-$VERSION-never-gonna-give-you-up-rom.zip kinetoscope-$VERSION-never-gonna-give-you-up-rom/
# Prep You Spin Me Round ROM.
mv kinetoscope-you-spin-me-round-rom/rom.bin kinetoscope-you-spin-me-round-rom/kinetoscope-you-spin-me-round.rom
cp source/LICENSE.txt kinetoscope-you-spin-me-round-rom/
echo "This Kinetoscope demo ROM will run on any system or emulator." >> kinetoscope-you-spin-me-round-rom/README.txt
mv kinetoscope-you-spin-me-round-rom kinetoscope-$VERSION-you-spin-me-round-rom
zip -r9 kinetoscope-$VERSION-you-spin-me-round-rom.zip kinetoscope-$VERSION-you-spin-me-round-rom/
# Prep streamer ROM.
mv kinetoscope-streamer-rom/rom.bin kinetoscope-streamer-rom/kinetoscope-streamer.rom
cp source/LICENSE.txt kinetoscope-streamer-rom/
echo "The Kinetoscope streamer ROM is built to be flashed to Kinetoscope hardware or run inside an emulator built with Kinetoscope support." >> kinetoscope-streamer-rom/README.txt
mv kinetoscope-streamer-rom kinetoscope-$VERSION-streamer-rom
zip -r9 kinetoscope-$VERSION-streamer-rom.zip kinetoscope-$VERSION-streamer-rom/
# Prep self-test ROM.
mv kinetoscope-self-test-rom/rom.bin kinetoscope-self-test-rom/kinetoscope-self-test.rom
cp source/LICENSE.txt kinetoscope-self-test-rom/
echo "The Kinetoscope self-test ROM is built to be flashed to Kinetoscope hardware or run inside an emulator built with Kinetoscope support." >> kinetoscope-self-test-rom/README.txt
mv kinetoscope-self-test-rom kinetoscope-$VERSION-self-test-rom
zip -r9 kinetoscope-$VERSION-self-test-rom.zip kinetoscope-$VERSION-self-test-rom/
# Prep firmware.
mv kinetoscope-firmware/firmware.ino.uf2 kinetoscope-firmware/kinetoscope-firmware.uf2
cp source/LICENSE.txt kinetoscope-firmware/
echo "The Kinetoscope firmware is built for the Raspberry Pi Pico W." >> kinetoscope-firmware/README.txt
mv kinetoscope-firmware kinetoscope-$VERSION-firmware
zip -r9 kinetoscope-$VERSION-firmware.zip kinetoscope-$VERSION-firmware/
# Prep hardware fab files.
(cd kinetoscope-hardware
for project in cart microcontroller sram-bank ethernet; do
unzip $project-fab.zip
rm $project-fab.zip
mv $project-fab kinetoscope-$VERSION-$project-fab
mv kinetoscope-$VERSION-$project-fab/$project-front.pos.csv kinetoscope-$VERSION-$project-front.pos.csv
mv kinetoscope-$VERSION-$project-fab/$project.bom.csv kinetoscope-$VERSION-$project.bom.csv
zip -r9 kinetoscope-$VERSION-$project-fab.zip kinetoscope-$VERSION-$project-fab/
rm -rf kinetoscope-$VERSION-$project-fab/
done
)
cp source/LICENSE.txt kinetoscope-hardware/
echo "These zip files contain Gerbers, BOM files, and position files for each board design." >> kinetoscope-hardware/README.txt
echo "" >> kinetoscope-hardware/README.txt
echo "The zip file can be uploaded to JLCPCB when they ask for Gerbers." >> kinetoscope-hardware/README.txt
echo "*.bom.csv is the BOM file in JLCPCB format." >> kinetoscope-hardware/README.txt
echo "*-front.pos.csv is the position file in JLCPCB format." >> kinetoscope-hardware/README.txt
mv kinetoscope-hardware kinetoscope-$VERSION-hardware
zip -r9 kinetoscope-$VERSION-hardware.zip kinetoscope-$VERSION-hardware/
# Prep emulator binaries for Linux.
echo "This build of BlastEm supports Kinetoscope emulation." >> kinetoscope-blastem-0.6.2-linux-x64/README.kinetoscope.txt
chmod 755 kinetoscope-blastem-0.6.2-linux-x64/blastem
mv kinetoscope-blastem-0.6.2-linux-x64 kinetoscope-$VERSION-blastem-0.6.2-linux-x64
zip -r9 kinetoscope-$VERSION-blastem-0.6.2-linux-x64.zip kinetoscope-$VERSION-blastem-0.6.2-linux-x64/
# Prep emulator binaries for Windows.
echo "This build of BlastEm supports Kinetoscope emulation." >> kinetoscope-blastem-0.6.2-windows-x64/README.kinetoscope.txt
chmod 755 kinetoscope-blastem-0.6.2-windows-x64/blastem.exe
mv kinetoscope-blastem-0.6.2-windows-x64 kinetoscope-$VERSION-blastem-0.6.2-windows-x64
zip -r9 kinetoscope-$VERSION-blastem-0.6.2-windows-x64.zip kinetoscope-$VERSION-blastem-0.6.2-windows-x64/
# Prep emulator binaries for macOS.
echo "This build of BlastEm supports Kinetoscope emulation." >> kinetoscope-blastem-0.6.2-macos-x64/README.kinetoscope.txt
chmod 755 kinetoscope-blastem-0.6.2-macos-x64/blastem
mv kinetoscope-blastem-0.6.2-macos-x64 kinetoscope-$VERSION-blastem-0.6.2-macos-x64
zip -r9 kinetoscope-$VERSION-blastem-0.6.2-macos-x64.zip kinetoscope-$VERSION-blastem-0.6.2-macos-x64/
# Prep emulator binaries for web.
echo "This build of the Genesis Plus GX libretro core supports Kinetoscope emulation." >> kinetoscope-genesis-plus-gx-web/README.kinetoscope.txt
chmod 644 kinetoscope-genesis-plus-gx-web/*
cp kinetoscope-$VERSION-streamer-rom/kinetoscope-streamer.rom kinetoscope-genesis-plus-gx-web/
cp source/emulator-patches/web-demo.html kinetoscope-genesis-plus-gx-web/index.html
cp source/emulator-patches/gesture-tracker.js kinetoscope-genesis-plus-gx-web/
cp -a kinetoscope-genesis-plus-gx-web kinetoscope-$VERSION-genesis-plus-gx-web
zip -r9 kinetoscope-$VERSION-genesis-plus-gx-web.zip kinetoscope-$VERSION-genesis-plus-gx-web/
- name: Upload GitHub Pages Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: kinetoscope-genesis-plus-gx-web
- name: Create release
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
generate_release_notes: false
make_latest: true
files: |
kinetoscope-*-encoder.zip
kinetoscope-*-player.zip
kinetoscope-*-never-gonna-give-you-up-rom.zip
kinetoscope-*-you-spin-me-round-rom.zip
kinetoscope-*-streamer-rom.zip
kinetoscope-*-self-test-rom.zip
kinetoscope-*-firmware.zip
kinetoscope-*-hardware.zip
kinetoscope-*-blastem-0.6.2-linux-x64.zip
kinetoscope-*-blastem-0.6.2-windows-x64.zip
kinetoscope-*-blastem-0.6.2-macos-x64.zip
kinetoscope-*-genesis-plus-gx-web.zip
pages:
needs:
- release
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4
id: deployment