74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push: {}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
project: [IRDKit]
|
|
runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
|
|
framework: [net8.0]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Build
|
|
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Release -p:DebugType=None -p:DebugSymbols=false
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}
|
|
path: ${{ matrix.project }}/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/*
|
|
|
|
pack:
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
project: [LibIRD]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Setup MSBuild
|
|
uses: microsoft/setup-msbuild@v2
|
|
|
|
- name: Setup NuGet
|
|
uses: NuGet/setup-nuget@v1
|
|
with:
|
|
nuget-version: 'latest'
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 9.0.x
|
|
|
|
- name: Restore NuGet packages
|
|
run: nuget restore LibIRD/LibIRD.csproj
|
|
|
|
- name: Build
|
|
run: msbuild ${{ matrix.project }}/${{ matrix.project }}.csproj /p:Configuration=Release
|
|
|
|
- name: Pack
|
|
run: dotnet pack ${{ matrix.project }}/${{ matrix.project }}.csproj -c Release -o ./artifacts
|
|
|
|
- name: Upload nupkg
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.project }}
|
|
path: ./artifacts/*.nupkg
|