From 74df95e31f3ef0398fa7938043c0452add8744eb Mon Sep 17 00:00:00 2001 From: currantw Date: Wed, 13 May 2026 15:09:56 -0700 Subject: [PATCH 1/3] Delete temp workflow Signed-off-by: currantw --- .github/workflows/relist-package.yml | 35 ---------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .github/workflows/relist-package.yml diff --git a/.github/workflows/relist-package.yml b/.github/workflows/relist-package.yml deleted file mode 100644 index 4e3348e3..00000000 --- a/.github/workflows/relist-package.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Re-list NuGet Package - -on: - workflow_dispatch: - inputs: - version: - description: "Package version to re-list" - required: true - -permissions: - contents: read - -jobs: - relist: - environment: Release - runs-on: ubuntu-latest - steps: - - name: Re-list Valkey.Glide ${{ inputs.version }} - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - PACKAGE_VERSION: ${{ inputs.version }} - run: | - echo "Re-listing Valkey.Glide version $PACKAGE_VERSION..." - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ - -H "X-NuGet-ApiKey: $NUGET_API_KEY" \ - "https://www.nuget.org/api/v2/package/Valkey.Glide/$PACKAGE_VERSION") - - echo "Response status: $HTTP_STATUS" - - if [ "$HTTP_STATUS" -eq 200 ]; then - echo "✅ Successfully re-listed Valkey.Glide $PACKAGE_VERSION" - else - echo "❌ Failed to re-list. HTTP status: $HTTP_STATUS" - exit 1 - fi From ee9902781d7152471694eb1a66a89510a417e40f Mon Sep 17 00:00:00 2001 From: currantw Date: Wed, 13 May 2026 15:28:29 -0700 Subject: [PATCH 2/3] Update CD workflow to test locally before publishing Signed-off-by: currantw --- .github/workflows/cd.yml | 61 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 5e79d4f0..897ed4c3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -43,7 +43,7 @@ jobs: working-directory: .github/json_matrices # Select all VM runners (non-container) — each produces a unique native binary for the NuGet package. run: | - PLATFORM_MATRIX=$(jq -c '[.[] | select(has("IMAGE") | not)]' < os-matrix.json) + PLATFORM_MATRIX=$(jq -c '[.[] | select(has("IMAGE") | not)]' < os-matrix.json) echo "PLATFORM_MATRIX=$PLATFORM_MATRIX" | tee -a "$GITHUB_OUTPUT" set-release-version: @@ -172,10 +172,20 @@ jobs: if-no-files-found: error path: sources/Valkey.Glide/bin/Release/Valkey.Glide.*nupkg + # Test the package locally before publishing to nuget.org. + test: + needs: [build-package-to-publish, set-release-version] + uses: ./.github/workflows/test.yml + with: + profile: standard + package-version: ${{ needs.set-release-version.outputs.RELEASE_VERSION }} + package-artifact-name: package + secrets: inherit + publish: environment: Release if: ${{ (inputs.nuget_publish == true || github.event_name == 'push') && github.repository_owner == 'valkey-io' }} - needs: [build-package-to-publish, set-release-version] + needs: [test, set-release-version] runs-on: ubuntu-latest env: RELEASE_VERSION: ${{ needs.set-release-version.outputs.RELEASE_VERSION }} @@ -191,50 +201,3 @@ jobs: dotnet nuget push "Valkey.Glide.$RELEASE_VERSION.nupkg" \ --api-key ${{ secrets.NUGET_API_KEY }} \ --source https://api.nuget.org/v3/index.json - - - name: Wait for package to be ready for download - run: | - dotnet new console --name temp-check --output . --framework net8.0 - TIMEOUT=600 # 10 minutes - INTERVAL=10 # 10 seconds - ELAPSED=0 - - while [ "$ELAPSED" -lt "$TIMEOUT" ]; do - echo "Checking availability... (${ELAPSED}s elapsed)" - if dotnet add package Valkey.Glide --version "$RELEASE_VERSION" ; then - echo "Package is now available!" - exit 0 - fi - sleep "$INTERVAL" - ELAPSED=$((ELAPSED + INTERVAL)) - dotnet nuget locals all --clear - done - - echo "Timeout: Package is not available after ${TIMEOUT}s" - exit 1 - - # Test the published package as users would install it from nuget.org. - # On dry-run (publish skipped), tests use the locally-built .nupkg artifact instead. - # If tests fail after a real publish, remove-package-if-validation-fails unlists the package. - test: - needs: [publish, set-release-version] - uses: ./.github/workflows/test.yml - with: - profile: full - package-version: ${{ needs.set-release-version.outputs.RELEASE_VERSION }} - package-artifact-name: ${{ needs.publish.result == 'skipped' && 'package' || '' }} - secrets: inherit - - remove-package-if-validation-fails: - needs: [publish, test, set-release-version] - if: ${{ !cancelled() }} - runs-on: ubuntu-latest - env: - RELEASE_VERSION: ${{ needs.set-release-version.outputs.RELEASE_VERSION }} - steps: - - name: Remove package from NuGet due to test failures - if: ${{ (needs.test.result == 'failure' && needs.publish.result == 'success') || needs.publish.result == 'failure' }} - run: | - dotnet nuget delete Valkey.Glide "$RELEASE_VERSION" \ - --api-key ${{ secrets.NUGET_API_KEY }} \ - --source https://api.nuget.org/v3/index.json --non-interactive From 76afb7f35ae539f561d9c741f75df80c632e0be7 Mon Sep 17 00:00:00 2001 From: currantw Date: Wed, 13 May 2026 15:50:04 -0700 Subject: [PATCH 3/3] Test `full` profile Signed-off-by: currantw --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 897ed4c3..9b71f949 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -177,7 +177,7 @@ jobs: needs: [build-package-to-publish, set-release-version] uses: ./.github/workflows/test.yml with: - profile: standard + profile: full package-version: ${{ needs.set-release-version.outputs.RELEASE_VERSION }} package-artifact-name: package secrets: inherit