Files
IFV 65476df9e3 refactor!: cleanup codebase (#15)
- Add GitHub Actions workflow
- Add CHANGES.md and USAGE.md
- General codebase cleanup

BREAKING CHANGE: replaced `System.debug` with `System.log_level`

Signed-off-by: Ryan Keane <the.ra2.ifv@gmail.com>
2025-12-20 22:57:47 +08:00

53 lines
1.2 KiB
YAML

name: Build
on:
workflow_call:
inputs:
# Not omitting, no defaults
build_type:
type: string
upload_artifacts:
type: boolean
env:
XMAKE_GLOBALDIR: "${{ github.workspace }}"
XMAKE_PKG_INSTALLDIR: "${{ github.workspace }}/.xmake/packages"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Cache Xmake package
uses: actions/cache@v4
with:
key: L4D2Fix-${{ github.ref_name }}-${{ github.sha }}
path: ${{ env.XMAKE_PKG_INSTALLDIR }}
restore-keys: L4D2Fix-
- name: Install xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Install just
uses: extractions/setup-just@v3
- name: Build
run: just --set XMAKE_TYPE ${{ inputs.build_type }} build
- name: Install
if: ${{ inputs.upload_artifacts }}
run: just distinstall
- name: Upload a Build Artifact
if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v6.0.0
with:
name: L4D2Fix-${{ github.sha }}-${{ env.XMAKE_MODE }}
path: ./${{ inputs.build_type }}
retention-days: 90
compression-level: 9