diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index dabdf5d..e529486 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -33,13 +33,24 @@ jobs: with: fetch-depth: 0 - # The monorel CI action runs `go mod tidy` per sub-module to refresh - # go.sum entries. Sub-modules require Go 1.25; the runner default is - # older and the action sets GOTOOLCHAIN=local, so install the Go we - # need explicitly before invoking monorel. + # The monorel CI action runs `go mod tidy` per sub-module with + # GOPROXY=off, so it can only resolve modules already in the local + # cache. Sub-modules also require Go 1.25, which the runner default + # doesn't supply. Install Go 1.25 with caching enabled, then prime + # the module cache via `go mod download` per module so monorel's + # GOPROXY=off tidy can find every transitive dep. - uses: actions/setup-go@v5 with: go-version: '1.25' + cache: true + cache-dependency-path: '**/go.sum' + + - name: Prime module cache for monorel tidy + run: | + set -euo pipefail + while IFS= read -r mod; do + (cd "$(dirname "$mod")" && go mod download) + done < <(find . -name go.mod -not -path './.git/*' | sort) - uses: disaresta-org/monorel/ci/github@v0.11.0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb6e675..a2a4602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,13 +42,24 @@ jobs: with: fetch-depth: 0 - # The monorel CI action runs `go mod tidy` per sub-module to refresh - # go.sum entries. Sub-modules require Go 1.25; the runner default is - # older and the action sets GOTOOLCHAIN=local, so install the Go we - # need explicitly before invoking monorel. + # The monorel CI action runs `go mod tidy` per sub-module with + # GOPROXY=off, so it can only resolve modules already in the local + # cache. Sub-modules also require Go 1.25, which the runner default + # doesn't supply. Install Go 1.25 with caching enabled, then prime + # the module cache via `go mod download` per module so monorel's + # GOPROXY=off tidy can find every transitive dep. - uses: actions/setup-go@v5 with: go-version: '1.25' + cache: true + cache-dependency-path: '**/go.sum' + + - name: Prime module cache for monorel tidy + run: | + set -euo pipefail + while IFS= read -r mod; do + (cd "$(dirname "$mod")" && go mod download) + done < <(find . -name go.mod -not -path './.git/*' | sort) - uses: disaresta-org/monorel/ci/github@v0.11.0 with: