diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a19e9da..8afead3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ env: DOTNET_VERSION: '10.0.x' Solution_Name: LanMountainDesktop.slnx DOTNET_gcServer: 1 + # Use system default NuGet cache to avoid path issues + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages jobs: build-windows: @@ -34,11 +36,22 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} dotnet-quality: 'preview' + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Restore run: dotnet restore ${{ env.Solution_Name }} - name: Build run: dotnet build ${{ env.Solution_Name }} --no-restore -c ${{ matrix.configuration }} -v minimal + env: + # Skip AirAppHost build to avoid recursive build issues + SkipAirAppHostBuild: true - name: Upload artifacts uses: actions/upload-artifact@v7 @@ -82,11 +95,22 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} dotnet-quality: 'preview' + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Restore run: dotnet restore ${{ env.Solution_Name }} - name: Build run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal + env: + # Skip AirAppHost build to avoid recursive build issues + SkipAirAppHostBuild: true - name: Upload artifacts uses: actions/upload-artifact@v7 @@ -116,11 +140,22 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} dotnet-quality: 'preview' + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Restore run: dotnet restore ${{ env.Solution_Name }} - name: Build run: dotnet build ${{ env.Solution_Name }} --no-restore -c Release -v minimal + env: + # Skip AirAppHost build to avoid recursive build issues + SkipAirAppHostBuild: true - name: Upload artifacts uses: actions/upload-artifact@v7 @@ -147,6 +182,14 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} dotnet-quality: 'preview' + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Pack SDK and template packages shell: pwsh run: .\scripts\Pack-PluginPackages.ps1 -Configuration Release -OutputPath .\artifacts\nuget diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99d9be1..5fe5c4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,8 @@ env: DOTNET_VERSION: '10.0.x' Solution_Name: LanMountainDesktop.slnx DOTNET_gcServer: 1 + # Use absolute path for NuGet cache to avoid path resolution issues + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages jobs: prepare: @@ -437,6 +439,14 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} dotnet-quality: 'preview' + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Stamp release version metadata shell: pwsh run: |