feat: provide way to build and attach platforms
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build the host-native release bundle and attach it to an existing Gitea
|
||||
# release. Meant for targets CI cannot build. Check out
|
||||
# the tagged commit first, so the crate version matches the tag.
|
||||
#
|
||||
# Required env: GITEA_API, GITEA_TOKEN (contents:write).
|
||||
# Optional env: TAG (defaults to the crate version), JQ.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
here="$(cd "$(dirname "$0")" && pwd)"
|
||||
: "${GITEA_API:?set GITEA_API, e.g., https://git.scient.ing/api/v1/repos/<owner>/<repo>}"
|
||||
: "${GITEA_TOKEN:?set GITEA_TOKEN to a token with contents:write}"
|
||||
|
||||
version="$(bash "$here/version.sh")"
|
||||
tag="${TAG:-$version}"
|
||||
asset="coursebank-${version}-$(bash "$here/platform-tag.sh").tar.gz"
|
||||
|
||||
echo "building ${asset} for release ${tag}"
|
||||
|
||||
pixi run setup-tools
|
||||
pixi run dist
|
||||
bash "$here/package.sh" "$asset" dist
|
||||
TAG="$tag" ASSETS="$asset $asset.sha256" bash "$here/attach-asset.sh"
|
||||
|
||||
echo "done: ${asset} attached to ${tag}"
|
||||
|
||||
Reference in New Issue
Block a user