Skip to content

fix release and prerelease jobs #322

fix release and prerelease jobs

fix release and prerelease jobs #322

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
- 'refs/tags/v*'
jobs:
game:
name: Game
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: papermario-dx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Download base ROM
run: |
curl -L $BASEROM_US_URL -o papermario.us.z64
nix-store --add-fixed sha256 papermario.us.z64
env:
BASEROM_US_URL: ${{ secrets.BASEROM_US_URL }}
- name: Build shell.nix
run: nix-build shell.nix
- name: Configure
run: nix-shell --run "./configure"
- uses: root-project/gcc-problem-matcher-improved@v0.0.1-alpha.1
- name: Build game
run: nix-shell --run "ninja"
- name: Build patch file
run: nix-shell --run "ninja ver/us/build/papermario.bps"
- name: Get repository name
id: repo-name
uses: MariachiBear/get-repo-name-action@v1.1.0
with:
string-case: paramCase
- name: Upload patch as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.repo-name.outputs.repository-name }}.bps
path: ver/us/build/papermario.bps
prerelease:
name: Prerelease
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Get repository name
id: repo-name
uses: MariachiBear/get-repo-name-action@v1.1.0
with:
string-case: paramCase
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.repo-name.outputs.repository-name }}.bps
path: ${{ steps.repo-name.outputs.repository-name }}.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: Development build
files: ${{ steps.repo-name.outputs.repository-name }}.bps
release:
name: Release
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/tags/v*'
steps:
- uses: actions/checkout@v4
- name: Get repository name
id: repo-name
uses: MariachiBear/get-repo-name-action@v1.1.0
with:
string-case: paramCase
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.repo-name.outputs.repository-name }}.bps
path: ${{ steps.repo-name.outputs.repository-name }}.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
files: ${{ steps.repo-name.outputs.repository-name }}.bps
darwin-cachix:
name: Build Nix shell for macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v15
with:
name: papermario-dx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Download base ROM
run: |
curl -L $BASEROM_US_URL -o papermario.us.z64
nix-store --add-fixed sha256 papermario.us.z64
env:
BASEROM_US_URL: ${{ secrets.BASEROM_US_URL }}
- name: Build shell.nix
run: nix-build shell.nix
env:
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: 1 # glibc is marked unsupported on darwin