Files
AudioManagerClient/scripts/publish-release.sh
T
TapTap 3281e46104
CI / test (push) Successful in 2m0s
CI / build (push) Successful in 13m27s
feat: add the Kotlin Multiplatform AudioManager client
A shared Compose Multiplatform client for Android, desktop and web on the
native mood-first API.

- Bearer login with persisted, restorable sessions.
- Mood grid and full editor (create, settings, seeds, delete).
- Server-driven radio sessions with automatic started/completed/skipped
  events and prefetching.
- Add to current mood or choose another mood from the player.
- Library search, original MP3 downloads, offline playback of downloads.
- Offline cache of moods, songs and the last sync revision.
- Platform audio: Media3 on Android, MP3SPI on desktop, HTML audio on web.
- Platform storage: filesystem on Android/desktop, localStorage on web.
- Desktop tests for API parsing, errors and cache persistence.
- Gitea CI image with Android SDK 35, build pipeline and tagged releases.
2026-11-14 18:24:06 +00:00

37 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Publishes APK, desktop jar and web bundle as assets on the Gitea release for
# the current tag. Runs from Actions, which provides GITHUB_* and GITHUB_TOKEN.
#
set -euo pipefail
DIST="${1:-dist}"
: "${GITHUB_SERVER_URL:?GITHUB_SERVER_URL is required}"
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
: "${GITHUB_REF_NAME:?GITHUB_REF_NAME is required}"
: "${GITHUB_TOKEN:?GITHUB_TOKEN is required}"
API="$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY"
TAG="$GITHUB_REF_NAME"
AUTH=(-H "Authorization: token $GITHUB_TOKEN")
JSON=(-H "Content-Type: application/json")
release_id="$(curl -fsS "${AUTH[@]}" "$API/releases/tags/$TAG" 2>/dev/null \
| python3 -c 'import json,sys; print(json.load(sys.stdin).get("id", ""))' || true)"
if [[ -z "$release_id" ]]; then
release_id="$(curl -fsS -X POST "${AUTH[@]}" "${JSON[@]}" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"AudioManager $TAG\",\"body\":\"Kotlin Multiplatform client: Android APK, desktop jar and web bundle.\"}" \
"$API/releases" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')"
fi
for file in "$DIST"/*; do
name="$(basename "$file")"
echo "Uploading $name to release $release_id"
curl -fsS -X POST "${AUTH[@]}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@$file" \
"$API/releases/$release_id/assets?name=$name"
done