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