From 66596d9938cdeb39c83345884b28417e2a7845fa Mon Sep 17 00:00:00 2001 From: Xudong Guo Date: Wed, 27 Dec 2023 10:35:00 +0800 Subject: [PATCH] fix --- .github/workflows/go.yaml | 7 ++++++- .github/workflows/release.yaml | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index f3c0f807..e0b36446 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -17,6 +17,11 @@ permissions: contents: read # Optional: allow read access to pull request. Use with `only-new-issues` option. # pull-requests: read + +env: + # Common versions + GO_VERSION: '1.20' + jobs: test: name: test @@ -25,7 +30,7 @@ jobs: - name: Set up Go 1.20 uses: actions/setup-go@v5 with: - go-version: 1.20 + go-version: ${{ env.GO_VERSION }} id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0b5fd705..7fb69071 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,6 +11,10 @@ permissions: # packages: write # issues: write +env: + # Common versions + GO_VERSION: '1.20' + jobs: goreleaser: runs-on: ubuntu-latest @@ -24,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.20 + go-version: ${{ env.GO_VERSION }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: