Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read go version from .go-version on GitHub Actions #210

Merged
merged 2 commits into from Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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