From d280bc82543c81c0dc7079088f31758c7f789a0f Mon Sep 17 00:00:00 2001 From: Austin Valle Date: Thu, 12 Jan 2023 14:52:44 -0500 Subject: [PATCH] Update setup-go to use `go.mod` (#176) --- .github/workflows/release.yml | 12 ++---------- .github/workflows/test.yml | 16 ++++++++-------- .go-version | 1 - 3 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 .go-version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a3cf85b..4c959812 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,14 +9,6 @@ permissions: contents: write jobs: - go-version: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.go-version.outputs.version }} - steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - id: go-version - run: echo "::set-output name=version::$(cat ./.go-version)" release-notes: runs-on: ubuntu-latest steps: @@ -32,7 +24,7 @@ jobs: retention-days: 1 terraform-provider-release: name: 'Terraform Provider Release' - needs: [go-version, release-notes] + needs: [release-notes] uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@106e6d08159ccec423310cc2c706bae59f46c09c # v2.2.0 secrets: hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}' @@ -46,6 +38,6 @@ jobs: signore-client-secret: '${{ secrets.SIGNORE_CLIENT_SECRET }}' with: release-notes: true - setup-go-version: '${{ needs.go-version.outputs.version }}' + setup-go-version-file: 'go.mod' # Product Version (e.g. v1.2.3 or github.ref_name) product-version: '${{ github.ref_name }}' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a5c128f..22b828b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,15 +19,15 @@ jobs: timeout-minutes: 5 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: Set up Go uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: - go-version: '1.18' + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Go fmt run: | make fmt @@ -58,15 +58,15 @@ jobs: - '0.15.1' steps: + - name: Check out code into the Go module directory + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: Set up Go uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: - go-version: '1.18' + go-version-file: 'go.mod' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: TF acceptance tests timeout-minutes: 10 env: diff --git a/.go-version b/.go-version deleted file mode 100644 index 8e8b0a93..00000000 --- a/.go-version +++ /dev/null @@ -1 +0,0 @@ -1.18.5