wangyoucao577/go-release-action

Unable to download latest Go version

Closed this issue · 2 comments

The current response while fetching the latest Go version from https://go.dev/VERSION?m=text breaks the action.

Workflow part:

- name: Publish binary (amd64)
  uses: wangyoucao577/go-release-action@v1.29
  with:
    goversion: "1.20"
    goos: linux
    goarch: amd64
    binary_name: ${{ env.BINARY_NAME }}
    md5sum: true
    sha256sum: true
    release_tag: ${{ needs.generate-tag.outputs.new_tag }}
    github_token: ${{ secrets.GITHUB_TOKEN }}

Action output:

+ source /setup-go.sh
+++ curl 'https://go.dev/VERSION?m=text'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    35  100    35    0     0    253      0 --:--:-- --:--:-- --:--:--   255
++ GO_LINUX_PACKAGE_URL='https://go.dev/dl/go1.21.1
time [20](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:21)23-08-31T22:36:09Z.linux-amd64.tar.gz'
++ [[ 1.20 == \1\.\1\8 ]]
++ [[ 1.20 == \1\.\1\7 ]]
++ [[ 1.20 == \1\.\1\6 ]]
++ [[ 1.20 == \1\.\1\5 ]]
++ [[ 1.20 == \1\.\1\4 ]]
++ [[ 1.20 == \1\.\1\3 ]]
++ [[ 1.20 == http* ]]
++ wget --progress=dot:mega https://go.dev/dl/go1.[21](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:22).1 time 2023-08-31T[22](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:23):36:09Z.linux-amd64.tar.gz -O go-linux.tar.gz
--20[23](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:24)-09-11 19:03:35--  https://go.dev/dl/go1.21.1
Resolving go.dev (go.dev)... 216.239.38.21, 216.239.34.21, 216.239.32.21, ...
Connecting to go.dev (go.dev)|216.239.38.21|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: [26](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:27)4 [text/html]
Saving to: 'go-linux.tar.gz'

     0K                                                      100% 4.87M=0s

2023-09-11 19:03:35 (4.87 MB/s) - 'go-linux.tar.gz' saved [264/264]

--2023-09-11 19:03:35--  http://time/
Resolving time (time)... failed: Name or service not known.
wget: unable to resolve host address 'time'
--2023-09-11 19:03:35--  ftp://2023-08-[31](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:32)t22/36:09Z.linux-amd64.tar.gz
           => 'go-linux.tar.gz'
Resolving 2023-08-31t22 (2023-08-31t22)... failed: Name or service not known.
wget: unable to resolve host address '2023-08-31t22'
FINISHED --2023-09-11 19:03:[35](https://github.com/baekker/baekker/actions/runs/6150630466/job/16689035688#step:8:36)--
Total wall clock time: 0.4s
Downloaded: 1 files, 264 in 0s (4.87 MB/s)

Workaround: Set goversion to a specific url

- name: Publish binary (amd64)
  uses: wangyoucao577/go-release-action@v1.29
  with:
    goversion: https://go.dev/dl/go1.20.8.linux-amd64.tar.gz
    goos: linux
    goarch: amd64
    binary_name: ${{ env.BINARY_NAME }}
    md5sum: true
    sha256sum: true
    release_tag: ${{ needs.generate-tag.outputs.new_tag }}
    github_token: ${{ secrets.GITHUB_TOKEN }}

It has been fixed by #135, use the latest version wangyoucao577/go-release-action@v1 please.