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

Accept minor release version string as goversion #109

Merged
merged 1 commit into from
Jan 13, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/autotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
goos: [linux]
goarch: [amd64]
# "" means default
goversion: ["", "1.19", "https://golang.org/dl/go1.16.1.linux-amd64.tar.gz"]
goversion: ["", "1.19", "1.19.5", "https://golang.org/dl/go1.16.1.linux-amd64.tar.gz"]
steps:
# - name: Wait release docker build for release branches
# if: contains(github.ref, 'release')
Expand Down Expand Up @@ -157,4 +157,4 @@ jobs:
build_flags: -v
overwrite: true
release_tag: v0.1-test-assets
compress_assets: ${{ matrix.compress_assets }}
compress_assets: ${{ matrix.compress_assets }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
| goos | **Mandatory** | `GOOS` is the running program's operating system target: one of `darwin`, `freebsd`, `linux`, and so on. |
| goarch | **Mandatory** | `GOARCH` is the running program's architecture target: one of `386`, `amd64`, `arm`, `arm64`, `s390x`, `loong64` and so on. |
| goamd64 | **Optional** | `GOAMD64` is the running programs amd64 microarchitecture level, which is available since `go1.18`. It should only be used when `GOARCH` is `amd64`: one of `v1`, `v2`, `v3`, `v4`. |
| goversion | **Optional** | The `Go` compiler version. `latest`([check it here](https://go.dev/VERSION?m=text)) by default, optional `1.13`, `1.14`, `1.15`, `1.16`, `1.17`, `1.18`, `1.19`. <br>It also takes download URL instead of version string if you'd like to use more specified version. But make sure your URL is `linux-amd64` package, better to find the URL from [Go - Downloads](https://go.dev/dl/).<br>E.g., `https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz`. |
| goversion | **Optional** | The `Go` compiler version. `latest`([check it here](https://go.dev/VERSION?m=text)) by default, optional `1.13`, `1.14`, `1.15`, `1.16`, `1.17`, `1.18`, `1.19`. You can also define a specific minor release, such as `1.19.5`. <br>Alternatively takes a download URL instead of version string. Make sure your URL references the `linux-amd64` package. You can find the URL on [Go - Downloads](https://go.dev/dl/).<br>e.g., `https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz`. |
| project_path | **Optional** | Where to run `go build`. <br>Use `.` by default. |
| binary_name | **Optional** | Specify another binary name if do not want to use repository basename. <br>Use your repository's basename if not set. |
| pre_command | **Optional** | Extra command that will be executed before `go build`. You may want to use it to solve dependency if you're NOT using [Go Modules](https://github.com/golang/go/wiki/Modules). |
Expand Down
2 changes: 2 additions & 0 deletions setup-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ elif [[ ${INPUT_GOVERSION} == "1.13" ]]; then
GO_LINUX_PACKAGE_URL="https://go.dev/dl/go1.13.15.linux-${ARCH}.tar.gz"
elif [[ ${INPUT_GOVERSION} == http* ]]; then
GO_LINUX_PACKAGE_URL=${INPUT_GOVERSION}
elif [[ -n ${INPUT_GOVERSION} ]]; then
GO_LINUX_PACKAGE_URL="https://go.dev/dl/go${INPUT_GOVERSION}.linux-${ARCH}.tar.gz"
fi

wget --progress=dot:mega ${GO_LINUX_PACKAGE_URL} -O go-linux.tar.gz
Expand Down