Skip to content

Update ci.yml

Update ci.yml #309

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the upcoming branch
push:
branches: [ upcoming ]
pull_request:
branches: [ ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Server:
strategy:
fail-fast: false
matrix:
os: [
{
name: Windows,
runs-on: windows-latest,
},
{
name: Ubuntu,
runs-on: ubuntu-latest,
},
{
name: macOS Arm64,
runs-on: macos-15-arm64,
}
]
profile: [
{
name: PC,
patch_target: p,
package_path: OTAPI.PC.nupkg,
},
{
name: Mobile,
patch_target: m,
package_path: OTAPI.Mobile.nupkg,
},
# { this is ultimately not supported yet, consideration in future when time permits
# name: tModLoader,
# patch_target: t,
# package_path: OTAPI.TML.nupkg,
# },
]
runs-on: ${{ matrix.os.runs-on }}
name: ${{ matrix.os.name }} ${{ matrix.profile.name }} Server
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Server patch
run: |
dotnet build OTAPI.Mods.slnf
cd OTAPI.Patcher/bin/Debug/net9.0
exec dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=${{ matrix.profile.patch_target }} -latest=n --framework net9.0
- name: Server boot
run: |
dotnet build OTAPI.Server.Launcher.slnf
cd OTAPI.Server.Launcher/bin/Debug/net9.0
exec dotnet OTAPI.Server.Launcher.dll -test-init
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} NuGet Package
path: OTAPI.Patcher/bin/Debug/net9.0/${{ matrix.profile.package_path }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} Binaries
path: |
OTAPI.Patcher/bin/Debug/net9.0/artifact-*/*
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} Wiki MD files
path: OTAPI.Patcher/bin/Debug/net9.0/*.mfw.md