diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index ad11091c..5e0668e1 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -48,6 +48,8 @@ jobs: else REGISTRY=docker.io/kubespheredev TAG=$tag make generate fi + sed -i "s/^LATEST_VERSION=.*/LATEST_VERSION=${TAG}/" hack/downloadKubekey.sh + gh release upload "$TAG" config/capkk/release/* --clobber gh release upload "$TAG" hack/downloadKubekey.sh --clobber env: diff --git a/hack/downloadKubekey.sh b/hack/downloadKubekey.sh index 7740eafa..58349642 100755 --- a/hack/downloadKubekey.sh +++ b/hack/downloadKubekey.sh @@ -15,6 +15,7 @@ # limitations under the License. ISLINUX=true +LATEST_VERSION= OSTYPE="linux" @@ -33,6 +34,10 @@ if [ "x$(uname)" != "xLinux" ]; then ISLINUX=false fi +if [ "x${VERSION}" = "xlatest" ]; then + VERSION=${LATEST_VERSION} +fi + # Fetch latest version of 3.x if [ "x${VERSION}" = "x" ]; then VERSION="$(curl -sL https://api.github.com/repos/kubesphere/kubekey/releases |