Files
firezone/scripts/upload/github-release.sh
Jamil f82478b877 ci: Add fixes for upload script (#7588)
- Attaching the standalone client needs to happen on `main` runs, like
the other clients
- GitHub can't seem to find the release. I suspect the
`GITHUB_REPOSITORY` var is unneeded.
2024-12-29 19:08:08 +00:00

21 lines
493 B
Bash
Executable File

#!/usr/bin/env bash
# Uploads built packages to a GitHub release
set -euo pipefail
# Only clobber existing release assets if the release is a draft
is_draft=$(gh release view "$RELEASE_NAME" --json isDraft --jq '.isDraft' | tr -d '\n')
if [[ "$is_draft" == "true" ]]; then
clobber="--clobber"
else
clobber=""
fi
sha256sum "$ARTIFACT_PATH" >"$ARTIFACT_PATH.sha256sum.txt"
gh release upload "$RELEASE_NAME" \
"$ARTIFACT_PATH" \
"$ARTIFACT_PATH.sha256sum.txt" \
$clobber