From 8d70b6225ce49b13cd0f4d779f0b348568050d10 Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Sat, 27 Jun 2026 17:29:14 +0200 Subject: [PATCH] Update Github Actions workflow --- .github/workflows/main.yml | 27 ++++++++++++------- Hazel/Hazel.csproj | 8 +++--- .../Impostor.Hazel.Abstractions.csproj | 2 +- .../Impostor.Hazel.Tests.csproj | 2 +- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11f515d..2fd034d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,29 +4,38 @@ on: [ "push", "pull_request" ] jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + + permissions: + id-token: write steps: - - uses: actions/checkout@v3 - with: - submodules: true + - uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 7.x + dotnet-version: 8.x - name: Run the Cake script - uses: cake-build/cake-action@94fa55b4f83cee90f2621654eba6a056ae71df90 + uses: cake-build/cake-action@v3 with: verbosity: Diagnostic - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v7 with: name: nuget packages path: ./*/bin/Release*/*.nupkg + # Use NuGet trusted publishing: https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing + - name: NuGet login + uses: NuGet/login@v1 + id: login + if: github.ref_type == 'tag' + with: + user: "${{ secrets.NUGET_USER }}" + - name: Push NuGet package if: github.ref_type == 'tag' run: | - dotnet nuget push ./{Hazel,Impostor.Hazel.Abstractions}/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} + dotnet nuget push ./{Hazel,Impostor.Hazel.Abstractions}/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }} diff --git a/Hazel/Hazel.csproj b/Hazel/Hazel.csproj index 021ad27..30ba031 100644 --- a/Hazel/Hazel.csproj +++ b/Hazel/Hazel.csproj @@ -1,8 +1,8 @@ - + true - net7.0 + net8.0 HAZEL_BAG Impostor.Hazel Impostor.Hazel @@ -16,8 +16,8 @@ - - + + diff --git a/Impostor.Hazel.Abstractions/Impostor.Hazel.Abstractions.csproj b/Impostor.Hazel.Abstractions/Impostor.Hazel.Abstractions.csproj index 6d30606..bf48d96 100644 --- a/Impostor.Hazel.Abstractions/Impostor.Hazel.Abstractions.csproj +++ b/Impostor.Hazel.Abstractions/Impostor.Hazel.Abstractions.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable true diff --git a/Impostor.Hazel.Tests/Impostor.Hazel.Tests.csproj b/Impostor.Hazel.Tests/Impostor.Hazel.Tests.csproj index a5a0a3b..55caf9d 100644 --- a/Impostor.Hazel.Tests/Impostor.Hazel.Tests.csproj +++ b/Impostor.Hazel.Tests/Impostor.Hazel.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable -- 2.39.5