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