mirror of
https://github.com/kurikomoe/L4D2Fix.git
synced 2026-10-10 12:53:08 +08:00
65476df9e3
- 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>
53 lines
1.2 KiB
YAML
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
|