-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |