`Publish Release on github` job fails in circleci
Yashk767 opened this issue · 1 comments
Description
Publish Release on github
job is throwing error - ghr command not found
- https://app.circleci.com/pipelines/github/razor-network/oracle-node/1950/workflows/da4b5a29-2852-4c39-aad4-89fb7004751a/jobs/2168
On checking ghr
repo(https://github.com/tcnksm/ghr/blob/master/go.mod#L3) its found that the maximum go version to run ghr is go1.19
and we updated go version to go1.21.1
and earlier it was go1.17
here in .circleci/config.yml
file -
docker:
- image: cimg/go:1.21.1
Solution
Running publish-github-release
job with latest supported go version for ghr
i.e. - image: cimg/go:1.19
would work and wont affect our binary execution, as we are booting older version to just push the binary to github.
CASE 1: If go version in go.mod file is 1.21.1 : ALWAYS FAILS
go 1.17, 1.19, 1.20 -> Throws error
/home/circleci/project/go.mod:3: invalid go version '1.21.1': must match format 1.23
go 1.21.1-> Throws error : “/bin/bash: line 5: ghr: command not found”
CASE 2: If go version in go.mod file is 1.21
go 1.19,1.20,1.21 -> throws error: “/bin/bash: line 5: ghr: command not found”
go 1.17 : SUCCESSFULL
Only cimg:go 1.17
is compatible for ghr to publish releases to github.