diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ac6e15b..bafaf6b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,34 +14,26 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.17 - uses: actions/setup-go@v1 - with: - go-version: 1.17 - id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: './go.mod' + id: go - name: Build - run: go build -o ./terraform-provider-azurecaf + run: go build -v ./... - - name: test - run: go test ./... + - name: Test + run: go test -v ./... - - name: lint - run: | - export PATH=$PATH:$(go env GOPATH)/bin - GO111MODULE=off go get github.com/bflad/tfproviderlint/cmd/tfproviderlint - tfproviderlint ./... + # To be updated + # - name: lint + # uses: golangci/golangci-lint-action@v3 + # # with: + # # version: 'v3.4.0' - name: Import GPG key id: import_gpg @@ -52,7 +44,7 @@ jobs: passphrase: ${{ secrets.PASSPHRASE }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 if: startsWith(github.ref, 'refs/tags/') with: version: v1.10.3 diff --git a/go.mod b/go.mod index fa8a751..304ed54 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/aztfmod/terraform-provider-azurecaf +go 1.20 + require github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1 require (