From 66cf86d0f595c72a6a4dbb2ff4e050677fde048a Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Sun, 28 Aug 2022 00:44:22 +0800 Subject: [PATCH] action: use go version in go.mod Signed-off-by: Abirdcfly --- .github/workflows/lint.yml | 2 ++ .github/workflows/release.yml | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7f387ce..7b87070 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,6 +15,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' - name: Run golangci-lint uses: golangci/golangci-lint-action@v3.2.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e96723f..77dfe71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,16 +9,15 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v3 - - - name: Run GoReleaser + with: + go-version-file: 'go.mod' + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v3 with: distribution: goreleaser