diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 052f0a697..c5570abce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,19 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow + - + name: Read go version + id: go-version + uses: juliangruber/read-file-action@v1 + with: + path: ./.go-version - name: Set up Go uses: actions/setup-go@v1 - with: # Ideally this should be picked up from .go-version rather than hard-coded - go-version: 1.14.1 + with: + # TODO: Replace with go-version-from-file when it is supported + # https://github.com/actions/setup-go/pull/62 + go-version: ${{ steps.go-version.outputs.content }} - name: Snapshot build (cross-platform) uses: goreleaser/goreleaser-action@v1 @@ -45,11 +53,19 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow + - + name: Read go version + id: go-version + uses: juliangruber/read-file-action@v1 + with: + path: ./.go-version - name: Set up Go uses: actions/setup-go@v1 - with: # Ideally this should be picked up from .go-version rather than hard-coded - go-version: 1.14.1 + with: + # TODO: Replace with go-version-from-file when it is supported + # https://github.com/actions/setup-go/pull/62 + go-version: ${{ steps.go-version.outputs.content }} - name: Go mod verify run: go mod verify diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ea798815..1a2168b68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,11 +15,19 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow + - + name: Read go version + id: go-version + uses: juliangruber/read-file-action@v1 + with: + path: ./.go-version - name: Set up Go uses: actions/setup-go@v1 - with: # Ideally this should be picked up from .go-version rather than hard-coded - go-version: 1.14.1 + with: + # TODO: Replace with go-version-from-file when it is supported + # https://github.com/actions/setup-go/pull/62 + go-version: ${{ steps.go-version.outputs.content }} - name: Install hc-codesign run: |