Update workflows
Some checks failed
Linux / build (Release) (push) Has been cancelled
MacOS / build (Release) (push) Has been cancelled
Windows / build (Release) (push) Has been cancelled

This commit is contained in:
Manu 2025-02-17 21:59:03 +01:00
parent 570e76aae8
commit 1f23818043
3 changed files with 38 additions and 27 deletions

View File

@ -18,6 +18,7 @@ jobs:
env:
Solution_Name: SwitchGiftDataManager.sln
Project_Path: SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj
steps:
- name: Checkout
@ -25,20 +26,21 @@ jobs:
with:
fetch-depth: 0
- name: Install .NET Core
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj --configuration Release --no-restore
- name: Test
run: dotnet test SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj --no-restore --verbosity normal
dotnet-version: 9.0.x
- name: Clean previous build artifacts
run: dotnet clean ${{ env.Project_Path }} --configuration ${{ matrix.configuration }}
- name: Install dependencies and build
run: |
dotnet restore ${{ env.Project_Path }}
dotnet build ${{ env.Project_Path }} --configuration ${{ matrix.configuration }} --no-restore
- name: Upload Linux CommandLine build artifacts
uses: actions/upload-artifact@v4
with:
name: Linux.CommandLine.App
path: SwitchGiftDataManager.CommandLine/bin
path: SwitchGiftDataManager.CommandLine/bin

View File

@ -18,6 +18,7 @@ jobs:
env:
Solution_Name: SwitchGiftDataManager.sln
Project_Path: SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj
steps:
- name: Checkout
@ -25,20 +26,30 @@ jobs:
with:
fetch-depth: 0
- name: Install .NET Core
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Cache NuGet packages
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install dependencies
run: dotnet restore
run: dotnet restore ${{ env.Project_Path }}
- name: Build
run: dotnet build SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj --configuration Release --no-restore
run: dotnet build ${{ env.Project_Path }} --configuration ${{ matrix.configuration }} --no-restore
- name: Test
run: dotnet test SwitchGiftDataManager.CommandLine/SwitchGiftDataManager.CommandLine.csproj --no-restore --verbosity normal
run: dotnet test ${{ env.Project_Path }} --no-restore --verbosity normal
- name: Upload MacOS CommandLine build artifacts
uses: actions/upload-artifact@v4
with:
name: MacOS.CommandLine.App
path: SwitchGiftDataManager.CommandLine/bin
path: SwitchGiftDataManager.CommandLine/bin

View File

@ -18,6 +18,7 @@ jobs:
env:
Solution_Name: SwitchGiftDataManager.sln
Configuration: ${{ matrix.configuration }}
steps:
- name: Checkout
@ -25,10 +26,10 @@ jobs:
with:
fetch-depth: 0
- name: Install .NET Core
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
@ -36,13 +37,10 @@ jobs:
- name: Execute unit tests
run: dotnet test
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Create the app package
run: msbuild $env:Solution_Name /property:Configuration=Release
- name: Restore and build the application
run: |
msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
msbuild $env:Solution_Name /property:Configuration=$env:Configuration
- name: Upload WinForms build artifacts
uses: actions/upload-artifact@v4
@ -54,4 +52,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows.CommandLine.App
path: SwitchGiftDataManager.CommandLine/bin
path: SwitchGiftDataManager.CommandLine/bin