Use PRODUCTION_BUILD define

This commit is contained in:
Kamil Trzciński 2022-12-15 21:38:49 +01:00
parent 998bf9506e
commit 727d4b82de
2 changed files with 3 additions and 2 deletions

View file

@ -42,9 +42,9 @@ jobs:
echo "MajorVer=$majorVer LastVer=$lastVer NextVer=$nextVer"
echo "RELEASE_VERSION=$nextVer" >> $GITHUB_ENV
- name: Build Release
run: dotnet build --configuration Release --output "${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}/" "/property:Version=${{ env.RELEASE_VERSION }}"
run: dotnet build --configuration Release --output "${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}/" "/property:Version=${{ env.RELEASE_VERSION }}" "/property:ExtraDefineConstants=PRODUCTION_BUILD"
- name: Build Debug
run: dotnet build --configuration Debug --output "${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}-debug/" "/property:Version=${{ env.RELEASE_VERSION }}"
run: dotnet build --configuration Debug --output "${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}-debug/" "/property:Version=${{ env.RELEASE_VERSION }}" "/property:ExtraDefineConstants=PRODUCTION_BUILD"
- name: Test
run: dotnet test --no-restore --verbosity normal
- uses: vimtor/action-zip@v1

View file

@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<DefineConstants Condition=" '$(ExtraDefineConstants)' != '' ">$(DefineConstants);$(ExtraDefineConstants)</DefineConstants>
</PropertyGroup>
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">