Skip to content

Commit

Permalink
Build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherJMiller committed May 8, 2024
1 parent b4c0e93 commit e3c68db
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build Game

on:
push:
tags:
- *.*.*

env:
CARGO_TERM_COLOR: always
ITCH_USERNAME: alumux
ITCH_GAME_ID: quatrix

jobs:
build-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Install required packages
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev libxcb-xfixes0-dev libxcb-shape0-dev cmake mingw-w64 zip
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Windows Target
run: rustup target add x86_64-pc-windows-gnu
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Setup Cache
uses: Swatinem/rust-cache@v1
- name: Build Windows Game
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: ./install_windows_client.sh
- name: Publish to Itch.io
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: windows
itchUsername: ${{ env.ITCH_USERNAME }}
itchGameId: ${{ env.ITCH_GAME_ID }}
buildNumber: ${{ steps.get_version.outputs.VERSION }}
buildChannel: windows
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Install required packages
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libudev-dev libxcb-xfixes0-dev libxcb-shape0-dev cmake mingw-w64 zip
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.77
override: true
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Setup Cache
uses: Swatinem/rust-cache@v1
- name: Build Linux Game
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: ./install_linux_client.sh
- name: Publish to Itch.io
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: linux
itchUsername: ${{ env.ITCH_USERNAME }}
itchGameId: ${{ env.ITCH_GAME_ID }}
buildNumber: ${{ steps.get_version.outputs.VERSION }}
buildChannel: linux

0 comments on commit e3c68db

Please sign in to comment.