diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 828f21d..a648978 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,10 @@ jobs: build: name: Build runs-on: ${{ matrix.os }} + permissions: + contents: write + id-token: write + packages: write strategy: fail-fast: false matrix: @@ -22,21 +26,28 @@ jobs: with: fetch-depth: 0 - - name: Install .NET SDK 6.0.x + - name: Install .NET SDK 8.0.x uses: actions/setup-dotnet@v5 with: - dotnet-version: '6.0.x' + dotnet-version: '8.0.x' - - name: Install .NET SDK 8.0.x + - name: Install .NET SDK 9.0.x uses: actions/setup-dotnet@v5 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - name: Install .NET SDK uses: actions/setup-dotnet@v5 with: global-json-file: global.json + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@v1 + id: login + if: matrix.os == 'windows-latest' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) + with: + user: ${{secrets.NUGET_USER}} + - name: Run Cake script uses: cake-build/cake-action@v3 env: @@ -45,7 +56,7 @@ jobs: GH_PACKAGES_NUGET_SOURCE: ${{ secrets.GH_PACKAGES_NUGET_SOURCE }} GH_PACKAGES_NUGET_APIKEY: ${{ secrets.GH_PACKAGES_NUGET_APIKEY }} NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} - NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }} + NUGET_APIKEY: ${{steps.login.outputs.NUGET_API_KEY}} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: cake-version: tool-manifest diff --git a/global.json b/global.json index 263c7a1..3bd1da9 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,6 @@ { "sdk": { - "version": "9.0.306" + "rollForward": "latestFeature", + "version": "10.0.100-rc.2.25502.107" } } \ No newline at end of file diff --git a/src/DPI/Commands/NuGet/NuGetAnalyzeCommand.cs b/src/DPI/Commands/NuGet/NuGetAnalyzeCommand.cs index f773ebf..93bbfbd 100644 --- a/src/DPI/Commands/NuGet/NuGetAnalyzeCommand.cs +++ b/src/DPI/Commands/NuGet/NuGetAnalyzeCommand.cs @@ -23,7 +23,7 @@ public class NuGetAnalyzeCommand : NuGetCommand where TSet private NuGetParsers NuGetParsers { get; } - public override async Task ExecuteAsync(CommandContext context, TSettings settings) + public override async Task ExecuteAsync(CommandContext context, TSettings settings, CancellationToken cancellationToken) { FilePathCollection filePaths; using (settings.Logger.BeginScope("GetFiles")) diff --git a/src/DPI/DPI.csproj b/src/DPI/DPI.csproj index c6044d4..408325e 100644 --- a/src/DPI/DPI.csproj +++ b/src/DPI/DPI.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net9.0 + net8.0;net9.0;net10.0 enable icon/dpi.png enable @@ -11,7 +11,7 @@ - +