From 55273d1b5ab82e87aecdcb2e7d9e9bfa56752c99 Mon Sep 17 00:00:00 2001 From: Ivandro Jao Date: Fri, 22 Nov 2024 11:14:06 +0000 Subject: [PATCH] Update NuGet setup and optimize artifact paths Upgraded NuGet setup action to v2 and added caching to speed up package restoration. Changed upload paths of compiled plugins from .zip to .dll to reflect updated build outputs and streamline artifact management. --- .github/workflows/main.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index caca8a4..a10f098 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,12 +23,19 @@ jobs: # Setup NuGet - name: Setup NuGet - uses: NuGet/setup-nuget@v1 - + uses: nuget/setup-nuget@v2 + + - uses: actions/cache@v4 + id: cache + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + # Restore NuGet packages - name: Restore NuGet packages + if: steps.cache.outputs.cache-hit != 'true' run: nuget restore "source\Plugins.Filter.slnf" - + # Build the solution - name: Build solution run: msbuild "source\Plugins.Filter.slnf" /p:Configuration=Release /p:SkipSharedProject=true @@ -46,34 +53,34 @@ jobs: uses: actions/upload-artifact@v4 with: name: Plugins - path: C:\plugins\*.zip + path: C:\plugins\*.dll - name: Upload Artifact (HI2UC) uses: actions/upload-artifact@v4 with: name: HI2UC - path: C:\plugins\HI2UC.zip + path: C:\plugins\HI2UC.dll - name: Upload Artifact (HIColorer) uses: actions/upload-artifact@v4 with: name: HIColorer - path: C:\plugins\HIColorer.zip + path: C:\plugins\HIColorer.dll - name: Upload Artifact (TightHyphen) uses: actions/upload-artifact@v4 with: name: TightHyphen - path: C:\plugins\TightHyphen.zip + path: C:\plugins\TightHyphen.dll - name: Upload Artifact (LinesUnbreaker) uses: actions/upload-artifact@v4 with: name: LinesUnbreaker - path: C:\plugins\LinesUnbreaker.zip + path: C:\plugins\LinesUnbreaker.dll - name: Upload Artifact (NoRecursiveDash) uses: actions/upload-artifact@v4 with: name: NoRecursiveDash - path: C:\plugins\NoRecursiveDash.zip + path: C:\plugins\NoRecursiveDash.dll