upload-nightly

 1#!/usr/bin/env bash
 2
 3bash -euo pipefail
 4source script/lib/blob-store.sh
 5
 6bucket_name="zed-nightly-host"
 7version=$(./script/get-crate-version zed)-"${GITHUB_RUN_NUMBER}+${GITHUB_SHA}"
 8
 9for file_to_upload in ./release-artifacts/*; do
10    [ -f "$file_to_upload" ] || continue
11    upload_to_blob_store_public $bucket_name "$file_to_upload" "nightly/$(basename "$file_to_upload")"
12    upload_to_blob_store_public $bucket_name "$file_to_upload" "${version}/$(basename "$file_to_upload")"
13    rm -f "$file_to_upload"
14done
15
16echo -n ${version} > ./release-artifacts/latest-sha
17upload_to_blob_store_public $bucket_name "release-artifacts/latest-sha" "nightly/latest-sha"