diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99258f6..1001587 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '^1.17' # The Go version to download (if necessary) and use. + go-version: '^1.22' # The Go version to download (if necessary) and use. - run: go test -race -coverprofile coverage.txt -coverpkg ./... -covermode atomic ./... - uses: codecov/codecov-action@v1 with: diff --git a/release.sh b/release.sh index 1f52123..2f447f0 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -eu + go install github.com/mitchellh/gox@latest mkdir -p release @@ -18,7 +20,7 @@ echo "Compiling:" os="windows linux darwin" arch="amd64 386 arm arm64 mips mips64 mipsle mips64le" -pushd cmd/ck-client || exit 1 +pushd cmd/ck-client CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output" CGO_ENABLED=0 GOOS="linux" GOARCH="mips" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mips_softfloat-"${v}" CGO_ENABLED=0 GOOS="linux" GOARCH="mipsle" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mipsle_softfloat-"${v}" @@ -27,7 +29,7 @@ popd os="linux" arch="amd64 386 arm arm64" -pushd cmd/ck-server || exit 1 +pushd cmd/ck-server CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output" mv ck-server-* ../../release popd