diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5570abce..9bd3a0b5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,9 @@ jobs: - name: Read go version id: go-version - uses: juliangruber/read-file-action@v1 - with: - path: ./.go-version + run: | + content=`cat ./.go-version` + echo "::set-output name=content::$content" - name: Set up Go uses: actions/setup-go@v1 @@ -54,18 +54,26 @@ 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: Read go version (Unix) + if: ${{ runner.os != 'Windows' }} + id: go-version-unix + run: | + content=`cat ./.go-version` + echo "::set-output name=content::$content" + - + name: Read go version (Windows) + if: ${{ runner.os == 'Windows' }} + id: go-version-win + run: | + $content = Get-Content .\.go-version -Raw + echo "::set-output name=content::$content" - name: Set up Go uses: actions/setup-go@v1 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 }} + go-version: ${{ steps.go-version-unix.outputs.content || steps.go-version-win.outputs.content }} - name: Go mod verify run: go mod verify diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07a9e4323..b64cf8242 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,9 @@ jobs: - name: Read go version id: go-version - uses: juliangruber/read-file-action@v1 - with: - path: ./.go-version + run: | + content=`cat ./.go-version` + echo "::set-output name=content::$content" - name: Set up Go uses: actions/setup-go@v1