Skip to content

build: merge matrix build into multiple steps #7

build: merge matrix build into multiple steps

build: merge matrix build into multiple steps #7

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Demeo
id: demeo-cache
uses: actions/cache@v4
with:
path: demeo
# demeo-version is pulled from Boardgame.Version.ChangeNo
key: demeo-${{ hashFiles('demeo-version') }}
- name: Setup SteamCMD
if: steps.demeo-cache.outputs.cache-hit != 'true'
uses: CyberAndrii/setup-steamcmd@v1
- name: Setup Steam Guard
if: steps.demeo-cache.outputs.cache-hit != 'true'
run: echo "${{ secrets.STEAM_CI_CONFIG }}" | base64 -d > ~/Steam/config/config.vdf
- name: Install Demeo
if: steps.demeo-cache.outputs.cache-hit != 'true'
run: steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir ${{ github.workspace }}/demeo +login ${{ secrets.STEAM_CI_USER }} +app_update 1484280 validate +quit
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.x
- name: Build for BuiltIn
env:
DemeoDir: ${{ github.workspace }}/demeo
run: dotnet build Py.LibNetwork/Py.LibNetwork.csproj -c BuiltIn -v d
- name: Upload BuiltIn Artifact
uses: actions/upload-artifact@v4
with:
name: Py.LibNetwork.BuiltIn.dll
path: Py.LibNetwork/bin/BuiltIn/netstandard2.1/Py.LibNetwork.BuiltIn.dll
- name: Build for BepInEx
env:
DemeoDir: ${{ github.workspace }}/demeo
run: dotnet build Py.LibNetwork/Py.LibNetwork.csproj -c BuiltIn -v d
- name: Upload BepInEx Artifact
uses: actions/upload-artifact@v4
with:
name: Py.LibNetwork.BepInEx.dll
path: Py.LibNetwork/bin/BepInEx/netstandard2.1/Py.LibNetwork.BepInEx.dll
- name: Build for MelonLoader
env:
DemeoDir: ${{ github.workspace }}/demeo
run: dotnet build Py.LibNetwork/Py.LibNetwork.csproj -c MelonLoader -v d
- name: Upload MelonLoader Artifact
uses: actions/upload-artifact@v4
with:
name: Py.LibNetwork.MelonLoader.dll
path: Py.LibNetwork/bin/MelonLoader/netstandard2.1/Py.LibNetwork.MelonLoader.dll