From 4cd7e9dae0c33b47145a4be4df940bccaa829599 Mon Sep 17 00:00:00 2001 From: Ben C Date: Sun, 3 Apr 2022 14:27:09 -0700 Subject: [PATCH] Make build Debug on non-master branches (#79) --- .github/workflows/build.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c6d8ca25..58f46f5d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,14 +25,6 @@ jobs: if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: windows-latest steps: - # Set to Release if we're in master, otherwise keep us in Debug - - name: Set Release - if: github.ref == 'refs/heads/master' - run: echo "BUILD_TYPE=Release" >> $GITHUB_ENV - - - name: Set Debug - if: github.ref != 'refs/heads/master' - run: echo "BUILD_TYPE=Debug" >> $GITHUB_ENV - uses: actions/checkout@v2 @@ -50,11 +42,20 @@ jobs: $data = Get-Content NewHorizons/NewHorizons.csproj.user $data = $data.Replace("`$(AppData)\OuterWildsModManager\OWML\Mods", ".") $data | Out-File -encoding ASCII NewHorizons/NewHorizons.csproj.user + + # Set to Release if we're in master, otherwise keep us in Debug + - name: Set Release + if: github.ref == 'refs/heads/master' + run: echo "BUILD_TYPE=Release" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + + - name: Set Debug + if: github.ref != 'refs/heads/master' + run: echo "BUILD_TYPE=Debug" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - uses: actions/setup-dotnet@v1 with: dotnet-version: "5.0.x" - - run: dotnet build -c ${{ env.BUILD_TYPE }} -o .\NewHorizons\Bin\${{ env.BUILD_TYPE }} + - run: dotnet build -c $Env:BUILD_TYPE -o .\NewHorizons\Bin\$Env:BUILD_TYPE - uses: actions/upload-artifact@v2 with: name: NewHorizons-${{ env.BUILD_TYPE }}