github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/scripts/release-ci.sh (about)

     1  #!/bin/bash
     2  #
     3  # Do a complete release. Run on CI.
     4  # Upload assets, run goreleaser, and notify Tilt Cloud of the new release binaries.
     5  
     6  set -ex
     7  
     8  if [[ "$(which brew)" == "" ]]; then
     9      echo "Missing Homebrew"
    10      exit 1
    11  fi
    12  
    13  if [[ "$GITHUB_TOKEN" == "" ]]; then
    14      echo "Missing GITHUB_TOKEN"
    15      exit 1
    16  fi
    17  
    18  if [[ "$DOCKER_TOKEN" == "" ]]; then
    19      echo "Missing DOCKER_TOKEN"
    20      exit 1
    21  fi
    22  
    23  if [[ "$TILT_CLOUD_TOKEN" == "" ]]; then
    24      echo "Missing Tilt release token"
    25      exit 1
    26  fi
    27  
    28  DIR=$(dirname "$0")
    29  cd "$DIR/.."
    30  
    31  echo "$DOCKER_TOKEN" | docker login --username "$DOCKER_USERNAME" --password-stdin
    32  
    33  mkdir -p ~/.windmill
    34  echo "$TILT_CLOUD_TOKEN" > ~/.windmill/token
    35  
    36  git fetch --tags
    37  git config --global user.email "it@tilt.dev"
    38  git config --global user.name "Tilt Dev"
    39  
    40  VERSION=$(git describe --abbrev=0 --tags)
    41  
    42  CI=false make build-js
    43  goreleaser --clean
    44  
    45  ./scripts/release-update-tilt-repo.sh "$VERSION"
    46  ./scripts/release-update-tilt-docs-repo.sh "$VERSION"
    47  ./scripts/record-release.sh "$VERSION"
    48  ./scripts/release-update-homebrew-core.sh "$VERSION"
    49  ./scripts/release-update-extension-repo.sh "$VERSION"