Skip to content

Commit

Permalink
Read go version from .go-version on GitHub Actions (#210)
Browse files Browse the repository at this point in the history
* Read go version from .go-version

* build: add comment to mention go-version-from-file PR

Co-authored-by: Radek Simko <radek.simko@gmail.com>
  • Loading branch information
jojo43 and radeksimko committed Jul 7, 2020
1 parent 6ad9609 commit aa04dcc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Expand Up @@ -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: |
Expand Down

0 comments on commit aa04dcc

Please sign in to comment.