From 0e6698dc560be5b86483e1317f37c775c0a61120 Mon Sep 17 00:00:00 2001 From: Ivan <39984678+LADIlib@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:47:12 +0300 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25add68..15990ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,10 @@ on: - '.github/**' workflow_dispatch: +env: + DOTNET_VERSION: '8.0' + CONFIGURATION: Release + jobs: windows: runs-on: windows-latest @@ -19,19 +23,19 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Restore the application run: nuget restore - name: Build for Windows - run: dotnet publish Audio.Desktop -c Release -r win-x64 + run: dotnet publish Audio.Desktop -c ${{ env.CONFIGURATION }} -r win-x64 --property:PublishDir='./publish' - name: Upload build artifacts uses: actions/upload-artifact@v3 with: name: net8.0_windows - path: Audio.Desktop/bin/Release/net8.0/win-x64/publish + path: ./publish linux: runs-on: ubuntu-latest @@ -43,19 +47,19 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Restore the application run: nuget restore - name: Build for Linux - run: dotnet publish Audio.Desktop -c Release -r linux-x64 + run: dotnet publish Audio.Desktop -c ${{ env.CONFIGURATION }} -r linux-x64 --property:PublishDir='./publish' - name: Upload build artifacts uses: actions/upload-artifact@v3 with: name: net8.0_linux - path: Audio.Desktop/bin/Release/net8.0/linux-x64/publish + path: ./publish osx: runs-on: ubuntu-latest @@ -67,16 +71,16 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.0.x + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Restore the application run: nuget restore - name: Build for Mac - run: dotnet publish Audio.Desktop -c Release -r osx-x64 + run: dotnet publish Audio.Desktop -c ${{ env.CONFIGURATION }} -r osx-x64 --property:PublishDir='./publish' - name: Upload build artifacts uses: actions/upload-artifact@v3 with: name: net8.0_osx - path: Audio.Desktop/bin/Release/net8.0/osx-x64/publish \ No newline at end of file + path: ./publish