Skip to content

Build Spec-Hops

Build Spec-Hops #2

Workflow file for this run

name: Release Binaries
on:
release:
types: [created]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
output-name: SpaceBoom-linux
- os: macos-latest
output-name: SpaceBoom-macos
- os: windows-latest
output-name: SpaceBoom-windows.exe
steps:
- uses: actions/checkout@v2
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libglew-dev libglfw3-dev libopenal-dev
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install cmake ninja glew glfw openal-soft
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install cmake ninja glew glfw openal
- name: Configure CMake
run: |
mkdir build
cd build
cmake -GNinja ..
- name: Build
run: |
cd build
ninja
- name: Package
run: |
mkdir SpaceBoom
cp -r OpenGL/res/* SpaceBoom/
cp build/OpenGL/OpenGL${{ matrix.os == 'windows-latest' && '.exe' || '' }} SpaceBoom/
zip -r ${{ matrix.output-name }}.zip SpaceBoom
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ matrix.output-name }}.zip
asset_name: ${{ matrix.output-name }}.zip
asset_content_type: application/zip