From 653d8228bad120a637c0fbcbfa921cbb6fea6112 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:43:09 -0500 Subject: [PATCH] chore: update workflows --- .github/workflows/publish.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e0b078..63c67cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,28 +11,12 @@ jobs: name: Publish to Go Module Proxy runs-on: ubuntu-latest steps: - - name: Request module from proxy - run: | - MODULE="github.com/StevanFreeborn/onspring-api-sdk-go" - VERSION="${{ inputs.version }}" - PROXY_URL="https://proxy.golang.org/${MODULE}/@v/${VERSION}.info" - - echo "Requesting: $PROXY_URL" - - # Request the module version to warm the proxy cache - # Retry up to 3 times with a delay since the proxy may need time to fetch - for i in 1 2 3; do - STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$PROXY_URL") - echo "Attempt $i: HTTP $STATUS" - - if [ "$STATUS" = "200" ]; then - echo "Module $MODULE@$VERSION is available on the Go module proxy" - exit 0 - fi - - echo "Waiting 30 seconds before retry..." - sleep 30 - done - - echo "Warning: Module may not be immediately available on the proxy (HTTP $STATUS)" - echo "It will be indexed automatically when first requested by a user" + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.25" + cache: false + - name: Publish module to proxy + env: + GOPROXY: proxy.golang.org + run: go list -m github.com/StevanFreeborn/onspring-api-sdk-go@${{ inputs.version }}