From d535512a6b147c48cdb1f07edb88f4a8faaf1c39 Mon Sep 17 00:00:00 2001 From: Gervasio Marchand Date: Tue, 20 Dec 2022 19:12:19 -0800 Subject: [PATCH] Also build the trimmed artifacts on the required check (#18) --- .github/workflows/build.yml | 16 +++++++++++++++- src/GetMoarFediverse.csproj | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2508b77..688c2aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,21 @@ on: - main jobs: - build: + build-artifacts: + runs-on: ubuntu-latest + strategy: + matrix: + runtime: [ win-x64, linux-x64, linux-arm64, osx-x64 ] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build artifact + shell: pwsh + run: | + $srcPath = Join-Path (Pwd) src + docker run -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:6.0.403-alpine3.16 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output" + + build-docker: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/src/GetMoarFediverse.csproj b/src/GetMoarFediverse.csproj index fe3fb36..eaf9beb 100644 --- a/src/GetMoarFediverse.csproj +++ b/src/GetMoarFediverse.csproj @@ -6,6 +6,7 @@ enable enable true + IL2026,IL2104