Skip to content

Commit 711e617

Browse files
committed
Update workflow
1 parent cd63dc6 commit 711e617

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

.github/workflows/main.yml

+12-24
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
configuration: [Release]
16-
1716
runs-on: windows-latest
18-
1917
env:
2018
Solution_Name: HomeLive.sln
2119

@@ -25,14 +23,11 @@ jobs:
2523
with:
2624
fetch-depth: 0
2725

28-
- name: Install .NET Core
26+
- name: Install .NET
2927
uses: actions/setup-dotnet@v4
3028
with:
3129
dotnet-version: 9.0.x
3230

33-
- name: Setup MSBuild.exe
34-
uses: microsoft/setup-msbuild@v2
35-
3631
- name: Checkout PKHeX.Core
3732
uses: actions/checkout@v4
3833
with:
@@ -44,32 +39,25 @@ jobs:
4439
run: |
4540
cd PKHeX/PKHeX.Core
4641
dotnet restore
47-
msbuild PKHeX.Core.csproj /p:Configuration=Release
42+
dotnet build --configuration Release
4843
4944
- name: Restore NuGet packages
50-
run: dotnet restore
45+
run: dotnet restore $env:Solution_Name
5146

52-
- name: Replace latest PKHeX.Core NuGet
47+
- name: Replace PKHeX.Core NuGet DLL
5348
shell: pwsh
5449
run: |
55-
$NuGetPackageFolder = Join-Path -Path $env:USERPROFILE -ChildPath ".nuget\packages\pkhex.core"
56-
$LatestVersion = (Get-ChildItem $NuGetPackageFolder | Sort-Object -Property LastWriteTime -Descending)[0].Name
50+
$PackageBaseFolder = Join-Path -Path $env:USERPROFILE -ChildPath ".nuget\packages\pkhex.core"
51+
$LatestVersionFolder = Get-ChildItem -Path $PackageBaseFolder -Directory | Sort-Object {[version]$_.Name} -Descending | Select-Object -First 1
52+
$NuGetPackageFolder = Join-Path -Path $LatestVersionFolder.FullName -ChildPath "lib\net9.0"
5753
$PkhexCoreDllSource = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "PKHeX/PKHeX.Core/bin/Release/net9.0/PKHeX.Core.dll"
58-
$PkhexCoreDllDest = Join-Path -Path $NuGetPackageFolder -ChildPath "$LatestVersion/lib/net9.0/PKHeX.Core.dll"
59-
Copy-Item -Path $PkhexCoreDllSource -Destination $PkhexCoreDllDest
60-
61-
- name: Execute unit tests
62-
run: dotnet test
54+
$PkhexCoreDllDest = Join-Path -Path $NuGetPackageFolder -ChildPath "PKHeX.Core.dll"
55+
Copy-Item -Path $PkhexCoreDllSource -Destination $PkhexCoreDllDest -Force
6356
64-
- name: Restore the application
65-
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
66-
env:
67-
Configuration: ${{ matrix.configuration }}
68-
69-
- name: Create the app package
70-
run: msbuild $env:Solution_Name /property:Configuration=Release
57+
- name: Build HomeLive.Plugins
58+
run: dotnet build $env:Solution_Name --configuration Release --no-restore
7159

72-
- name: Upload build artifacts
60+
- name: Upload Plugins artifacts
7361
uses: actions/upload-artifact@v4
7462
with:
7563
name: HomeLive.Plugins

0 commit comments

Comments
 (0)