diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dde800..57b7796 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,87 +11,75 @@ on: env: BuildVersion: "CI.${{ github.run_id }}" BuildBranch: "${{ github.ref }}" - BuildParameters: "/v:Minimal /p:Configuration=Release Eto.Veldrid.sln" + BuildParameters: "-m:1 -c Release" + PackParameters: "--no-build --no-restore -m:1 -c Release" + DotNetVersion: '8.0.x' jobs: build-windows: runs-on: windows-latest - env: - PlatformBuildParameters: /p:Platform=Windows - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' + - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Install macos workload - run: dotnet workload install macos + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DotNetVersion }} - - name: Build - run: dotnet build ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Build + run: | + dotnet build ${{ env.BuildParameters }} test\TestEtoVeldrid.Wpf\TestEtoVeldrid.Wpf.csproj + dotnet build ${{ env.BuildParameters }} test\TestEtoVeldrid.WinForms\TestEtoVeldrid.WinForms.csproj - - name: Pack - run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Pack + run: | + dotnet pack ${{ env.PackParameters }} src\Eto.Veldrid.Wpf\Eto.Veldrid.Wpf.csproj + dotnet pack ${{ env.PackParameters }} src\Eto.Veldrid.WinForms\Eto.Veldrid.WinForms.csproj - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: nuget - path: artifacts/nuget/**/*.nupkg + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: nuget + path: | + artifacts/nuget/**/Eto.Veldrid.Wpf.*.nupkg + artifacts/nuget/**/Eto.Veldrid.WinForms.*.nupkg build-mac: runs-on: macos-latest env: - PlatformBuildParameters: /p:Platform=Mac + PlatformBuildParameters: /p:Platform=Mac Eto.Veldrid.sln steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Setup XCode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DotNetVersion }} - - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- + - name: Setup XCode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable - - name: Install macos workload - run: dotnet workload install macos + - name: Install macos workload + run: dotnet workload install macos - - name: Build - run: dotnet build ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Build + run: dotnet build ${{ env.BuildParameters }} ${{ env.PlatformBuildParameters }} - - name: Pack - run: dotnet pack ${{ env.PlatformBuildParameters }} ${{ env.BuildParameters }} + - name: Pack + run: dotnet pack ${{ env.PackParameters }} ${{ env.PlatformBuildParameters }} -# - name: Upload artifacts -# uses: actions/upload-artifact@v4 -# with: -# name: nuget -# path: artifacts/nuget/**/Eto.Veldrid.XamMac2.nupkg + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: nuget + path: artifacts/nuget/**/*.nupkg publish: needs: [ build-windows, build-mac ] @@ -100,6 +88,8 @@ jobs: steps: - name: Setup .NET Core uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DotNetVersion }} - name: Download NuGet Packages uses: actions/download-artifact@v4