From f5fcb9cfdad649edefc1a194fca35d081041fd6c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 25 Nov 2023 20:46:43 -0800 Subject: [PATCH] Try to find dotnet --- .github/workflows/build.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index badc45937..e39a17b3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,10 @@ on: pull_request: branches: [ "develop" ] +env: + DOTNET_VERSION: 6.0.405 + SOLUTION_FILE: src/Sonarr.sln + jobs: build_backend: runs-on: windows-latest @@ -17,8 +21,19 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.405 - - name: Restore dependencies - run: dotnet restore + dotnet-version: ${{env.DOTNET_VERSION}} + - name: Find dotnet executable + run : where dotnet + - name: Enable Extra Platforms + shell: bash + run: | + BUNDLEDVERSIONS=${{TBD}}/dotnet/sdk/${DOTNET_VERSION}/Microsoft.NETCoreSdk.BundledVersions.props + echo $BUNDLEDVERSIONS + if grep -q freebsd-x64 $BUNDLEDVERSIONS; then + echo "Extra platforms already enabled" + else + echo "Enabling extra platform support" + sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS + fi - name: Build Backend - run: dotnet build --no-restore + run: ./build.sh --backend --enable-extra-platforms --packages