mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make build Debug on non-master branches (#79)
This commit is contained in:
parent
a6b7dc4b8f
commit
4cd7e9dae0
19
.github/workflows/build.yaml
vendored
19
.github/workflows/build.yaml
vendored
@ -25,14 +25,6 @@ jobs:
|
|||||||
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
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
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -50,11 +42,20 @@ jobs:
|
|||||||
$data = Get-Content NewHorizons/NewHorizons.csproj.user
|
$data = Get-Content NewHorizons/NewHorizons.csproj.user
|
||||||
$data = $data.Replace("<OuterWildsModsDirectory>`$(AppData)\OuterWildsModManager\OWML\Mods</OuterWildsModsDirectory>", "<OuterWildsModsDirectory>.</OuterWildsModsDirectory>")
|
$data = $data.Replace("<OuterWildsModsDirectory>`$(AppData)\OuterWildsModManager\OWML\Mods</OuterWildsModsDirectory>", "<OuterWildsModsDirectory>.</OuterWildsModsDirectory>")
|
||||||
$data | Out-File -encoding ASCII NewHorizons/NewHorizons.csproj.user
|
$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
|
- uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "5.0.x"
|
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
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: NewHorizons-${{ env.BUILD_TYPE }}
|
name: NewHorizons-${{ env.BUILD_TYPE }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user