Skip to content

Release

Release #43

Workflow file for this run

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