From edf72c6304490d5424e33b6248c96038d18f3255 Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Fri, 19 Sep 2025 23:08:47 +1000 Subject: [PATCH] Use version in `go.mod` for CI build (#2170) * Use version in `go.mod` for CI * reorder --- .github/workflows/go.yml | 20 +++++++------------- .github/workflows/release.yml | 4 ++-- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index df49d033..d0e614bc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,19 +8,17 @@ on: jobs: tests: - runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - name: Set up Go + - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version-file: go.mod - name: Build run: go build -v ./... @@ -37,13 +35,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - name: Set up Go + - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version-file: go.mod - name: Cross-compile on all supported platforms run: gen/xbuild.sh @@ -52,13 +48,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - name: Set up Go + - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version-file: go.mod - name: Test `go fmt` creates no diffs run: go fmt && git diff --exit-code diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5068d9b..8903446c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Set up Go + - name: Setup Go uses: actions/setup-go@v6 with: - go-version: "1.24" + go-version-file: go.mod - name: Build run: gen/xbuild.sh