Skip to content

Commit

Permalink
add build and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 committed Feb 1, 2024
1 parent 1c8bd30 commit f144165
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build
on:
push:
pull_request:

jobs:
game:
name: Game
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: ./install_deps.sh
- name: Install compilers
run: ./install_compilers.sh
- name: Install Flips
run: flatpak install com.github.Alcaro.Flips -y
- name: Download baserom
run: curl -L $BASEROM_US_URL -o ver/us/baserom.z64
env:
BASEROM_US_URL: ${{ secrets.BASEROM_US_URL }}
- name: Configure
run: ./configure.sh
- name: Build
run: ninja
- name: Create patch file
run: flips ver/us/baserom.z64 ver/us/build/papermario.z64 ver/us/build/papermario.bps
- name: Upload patch as artifact
uses: actions/upload-artifact@v2
with:
name: papermario.bps
path: ver/us/build/papermario.bps
prerelease:
name: Prerelease
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: papermario.bps
path: papermario.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: Development build
files: papermario.bps
release:
name: Release
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/tags/v*'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: papermario.bps
path: papermario.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
files: papermario.bps

0 comments on commit f144165

Please sign in to comment.