Skip to content

Commit 369f0e2

Browse files
authored
Update setup-go to obtain version via go-version-file (#137)
1 parent 8185fbb commit 369f0e2

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,11 @@ jobs:
3131
-
3232
name: Unshallow
3333
run: git fetch --prune --unshallow
34-
-
35-
name: Read go version (Unix)
36-
if: ${{ runner.os != 'Windows' }}
37-
id: go-version-unix
38-
run: |
39-
content=`cat ./.go-version`
40-
echo "::set-output name=content::$content"
41-
-
42-
name: Read go version (Windows)
43-
if: ${{ runner.os == 'Windows' }}
44-
id: go-version-win
45-
run: |
46-
$content = Get-Content .\.go-version -Raw
47-
echo "::set-output name=content::$content"
4834
-
4935
name: Set up Go
5036
uses: actions/setup-go@v3
5137
with:
52-
# TODO: Replace with go-version-from-file when it is supported
53-
# https://github.com/actions/setup-go/pull/62
54-
go-version: ${{ steps.go-version-unix.outputs.content || steps.go-version-win.outputs.content }}
38+
go-version-file: ".go-version"
5539
-
5640
name: Go mod download
5741
run: go mod download -x

0 commit comments

Comments
 (0)