Add standalone desktop workflow

This commit is contained in:
2026-04-24 11:54:33 +03:00
parent 75c6b928ae
commit 50246ada85
20 changed files with 1068 additions and 306 deletions

39
ops/build-release.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
set -eu
ROOT_DIR=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
RELEASE_DIR="${ROOT_DIR}/release"
CACHE_DIR="${RELEASE_DIR}/.gocache"
VERSION=${VERSION:-$(git -C "${ROOT_DIR}" describe --tags --always 2>/dev/null || echo dev)}
build_target() {
goos="$1"
goarch="$2"
output_name="$3"
echo "building ${goos}/${goarch} -> ${output_name}"
env \
GOCACHE="${CACHE_DIR}" \
GOOS="${goos}" \
GOARCH="${goarch}" \
go build \
-ldflags "-X main.Version=${VERSION}" \
-o "${RELEASE_DIR}/${output_name}" \
./cmd/jukebox
}
command -v go >/dev/null 2>&1 || {
echo "error: go not found in PATH" >&2
exit 1
}
mkdir -p "${RELEASE_DIR}" "${CACHE_DIR}"
build_target darwin arm64 jukebox-darwin-arm64
build_target windows 386 jukebox-windows-386.exe
echo ""
echo "artifacts:"
echo " ${RELEASE_DIR}/jukebox-darwin-arm64"
echo " ${RELEASE_DIR}/jukebox-windows-386.exe"