From 4151f4439f14faf80ac03956d6d6321e94d051ea Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 17 Sep 2026 10:12:23 +0000 Subject: [PATCH] ci(release): pack both packages first, timeout, kill obsolete env Pack Core and MCP nupkgs before either nuget push so a failed MCP pack cannot leave a tag half-published. Add a job timeout, replace DOTNET_SKIP_FIRST_TIME_EXPERIENCE with DOTNET_NOLOGO, and SHA-pin the GitHub Actions (especially third-party NuGet/login). Co-authored-by: Tyler Kron --- .github/workflows/release.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86ea29d9..842e14a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,21 +5,22 @@ on: types: [published] env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: true jobs: publish: runs-on: ubuntu-latest + timeout-minutes: 45 permissions: id-token: write contents: read steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup .NET - uses: actions/setup-dotnet@v6 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 with: dotnet-version: | 9.0.x @@ -44,11 +45,18 @@ jobs: - name: Test run: dotnet test --configuration Release --no-build + # Pack both nupkgs before either push. If MCP pack fails after Core is already + # on nuget.org, the tag is half-published; `--skip-duplicate` only helps a retry + # of the same push, not the missing second package. + - name: Pack run: dotnet pack src/Daqifi.Core/Daqifi.Core.csproj --configuration Release --no-build -p:PackageVersion=${VERSION} --output nupkgs + - name: Pack MCP server (dotnet tool) + run: dotnet pack src/Daqifi.Mcp/Daqifi.Mcp.csproj --configuration Release --no-build -p:PackageVersion=${VERSION} --output nupkgs + - name: NuGet login (OIDC -> temp API key) - uses: NuGet/login@v1 + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 id: login with: user: tylerkron @@ -56,9 +64,6 @@ jobs: - name: Push to NuGet run: dotnet nuget push nupkgs/Daqifi.Core.*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate - - name: Pack MCP server (dotnet tool) - run: dotnet pack src/Daqifi.Mcp/Daqifi.Mcp.csproj --configuration Release --no-build -p:PackageVersion=${VERSION} --output nupkgs - - name: Push MCP server to NuGet run: dotnet nuget push nupkgs/Daqifi.Mcp.*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate