Kaleido/.forgejo/workflows/release.yml
Elijah bdc37db05d Fix playback lifecycle, server-change and navigation bugs from review
Playback
- A preparation finishing after Home no longer starts playing in the
  background; the post-play countdown only runs while Kaleido is on screen.
- Closing or backgrounding during preparation keeps the requested resume
  position instead of reporting the player's unprepared 0.
- Progress, scrobble and transcode-stop reports stay pinned to the server
  the title came from, even after a server change.

Networking
- Cancelling a request now cancels its OkHttp call, so timeouts such as the
  3-second server-stop check actually return on time.
- Connection discovery accepts the most preferred answering address without
  waiting for slower, less preferred probes.

State and navigation
- Server/account changes clear episode queues, shuffle, version choices,
  episode selections and search.
- Leaving Search cancels its pending request.
- Version selection updates the format badges and technical line.
- Down from the Home tab enters the rows when there is no featured title.
- Back (or a new Cancel button) closes Settings > Choose server.
- One unavailable show no longer discards the whole New Seasons row.

Release
- package_release.py and CI check the APK's own versionName/versionCode
  (and that it is not debuggable) via scripts/verify_distribution.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:52:52 -07:00

49 lines
2.5 KiB
YAML

name: Validate and publish Kaleido
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
jobs:
android:
runs-on: ubuntu-latest
container:
image: node:22-bookworm
timeout-minutes: 40
steps:
- uses: https://data.forgejo.org/actions/checkout@v4.4.0
- name: Install Android toolchain
run: |
set -eu
apt-get update
apt-get install -y --no-install-recommends openjdk-17-jdk-headless unzip curl python3 ca-certificates
mkdir -p .tools/sdk/cmdline-tools
curl -fsSL https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -o .tools/cmdline.zip
unzip -q .tools/cmdline.zip -d .tools/sdk/cmdline-tools
mv .tools/sdk/cmdline-tools/cmdline-tools .tools/sdk/cmdline-tools/latest
curl -fsSL https://services.gradle.org/distributions/gradle-8.13-bin.zip -o .tools/gradle.zip
unzip -q .tools/gradle.zip -d .tools
yes | .tools/sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root="$PWD/.tools/sdk" --licenses >/dev/null
.tools/sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root="$PWD/.tools/sdk" 'platforms;android-36' 'build-tools;35.0.0'
keytool -genkeypair -keystore .tools/kaleido-signing.jks -storepass kaleido-local -keypass kaleido-local -alias kaleido -keyalg RSA -keysize 2048 -validity 1 -dname 'CN=Ephemeral CI validation' -noprompt
- name: Compile, test, lint, and verify the signed distribution
run: |
set -eu
export ANDROID_HOME="$PWD/.tools/sdk"
export GRADLE_USER_HOME="$PWD/.gradle"
.tools/gradle-8.13/bin/gradle --no-daemon assembleDebug testDebugUnitTest lintDebug
if test -f distribution/Kaleido.apk; then
(cd distribution && sha256sum -c Kaleido.apk.sha256)
.tools/sdk/build-tools/35.0.0/apksigner verify --verbose --print-certs distribution/Kaleido.apk
# The APK's own manifest must carry the advertised version (and, for a tag, version.properties').
case "${{ github.ref }}" in
refs/tags/v*) python3 scripts/verify_distribution.py --release ;;
*) python3 scripts/verify_distribution.py ;;
esac
fi
- name: Publish signed tag release
if: startsWith(github.ref, 'refs/tags/v')
env:
KALEIDO_RELEASE_TOKEN: ${{ github.token }}
RELEASE_REF: ${{ github.ref }}
run: python3 scripts/publish_release.py