Files
free-steam-games-list/.github/workflows/release-android.yml
T
poli0981andClaude Opus 5.5 d057e3f620 fix(deps): patch the open advisories in npm, cargo and pip; Node 24 actions
npm (web/):
- undici 7.30.1 through a "miniflare" override (GHSA-xjj6-f33q-929c,
  GHSA-4qv8-2p9j-2685, GHSA-f72v-6w45-q472). miniflare pins undici exactly
  and wrangler 4.152.0, the newest, still ships 7.29.1. Local tooling only.
- zod 4.6.7 (GHSA-mrhx-c7xc-m3w5, via knip).
- Minor/patch: @lucide/svelte 1.61.0, @tanstack/svelte-virtual 3.13.48,
  bits-ui 2.20.2, vite 8.3.5, wrangler 4.152.0, knip 6.43.0,
  @tauri-apps/cli 2.12.4.

cargo (web/src-tauri/Cargo.lock, targeted updates only):
- rustls 0.23.46 (RUSTSEC-2026-0346..0349), rustls-webpki 0.103.16
  (RUSTSEC-2026-0382), webpki-root-certs 1.0.11 (RUSTSEC-2026-0383),
  tokio 1.54.1 (RUSTSEC-2026-0386), anyhow 1.0.104 (RUSTSEC-2026-0190),
  event-listener 5.4.2 (RUSTSEC-2026-0221), plist 1.10.3 -> quick-xml
  0.42.0 (RUSTSEC-2026-0194/0195). Dependabot had none of these.
- Left upstream: zip 4 (tauri-plugin-updater 2.14.0 asks for ^4), glib 0.18
  (GTK 3), unmaintained proc-macro-error/zbus_names/zvariant.

pip: certifi 2026.10.23, coverage 7.17.0 (tests), with every file's hash.

CI: actions/checkout v4/v5 -> v6 and actions/setup-python v5 -> v6
everywhere (the Node 20 majors warned on every data job), rust-cache 2.9.3
by SHA. dependabot.yml says why those majors are taken by hand.

CLAUDE.md: the undici override and when to drop it; why SvelteKit stays on 2
(GHSA-27mw-82g8-phjj and GHSA-pfhg-q3qv-9q6r need setHeaders or use:enhance,
which the app does not have).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:50:58 +07:00

165 lines
6.8 KiB
YAML

name: Release Android App
# Builds a signed, universal release APK and attaches it to a (draft) GitHub
# Release. Triggered by pushing an `android-v*` tag, or manually.
#
# Required repo secrets (Settings → Secrets and variables → Actions):
# ANDROID_KEYSTORE_BASE64 base64 of the release keystore (.jks):
# `base64 -w0 release.jks` (Linux/macOS) or
# `[Convert]::ToBase64String([IO.File]::ReadAllBytes("release.jks"))` (PowerShell)
# ANDROID_KEYSTORE_PASSWORD store password
# ANDROID_KEY_ALIAS key alias
# ANDROID_KEY_PASSWORD key password
# Without these, the build can't sign and this workflow fails on purpose — an
# unsigned APK can't be installed. KEEP THE KEYSTORE + PASSWORDS BACKED UP:
# every future update must be signed with the SAME key or users must uninstall.
on:
push:
tags:
- 'android-v*'
workflow_dispatch:
inputs:
tag:
# No default: a run rebuilds the tag it names and replaces that
# release's APK, so a stale default is one click from overwriting an
# old release.
description: 'Existing tag to build and release (e.g. android-v2.0.0)'
required: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# A manual run builds the tag it is releasing, not whatever main is at by
# then: a re-run after a CI-only fix must not ship newer app code under an
# older version's tag.
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
# The commit actually built. On a manual run `github.sha` is main's HEAD,
# not the tag checked out above.
- name: Record the source commit
id: source
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'
- uses: actions/setup-node@v7
with:
node-version: '26'
cache: 'npm'
cache-dependency-path: web/package-lock.json
# Third-party actions are pinned to a commit (see release-desktop.yml).
- name: Install Rust toolchain + Android targets
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1 (master)
with:
toolchain: stable
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
workspaces: 'web/src-tauri -> target'
# platform-tools only. The action's default also installs the legacy
# `tools` package, which Google has removed from the SDK repository:
# `sdkmanager tools` fails with "Failed to find package 'tools'" and the
# whole release stops before building (android-v2.0.0, 2026-09-17).
# Gradle installs the build-tools and platform it needs on its own.
- name: Set up Android SDK
uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4
with:
packages: platform-tools
log-accepted-android-sdk-licenses: false
- name: Set up Android NDK
id: setup-ndk
uses: nttld/setup-ndk@ed92fe6cadad69be94a966a7ee3271275e62f779 # v1.6.0
with:
ndk-version: r27
link-to-sdk: true
local-cache: true
- name: Export NDK_HOME
run: echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
- name: Install web dependencies
working-directory: web
# Plain `npm ci`, as in web-ci.yml: build from the tested lockfile or
# not at all, and with no lifecycle scripts (web-ci.yml says why).
run: npm ci --ignore-scripts
- name: Configure release keystore
working-directory: web/src-tauri/gen/android
env:
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
run: |
if [ -z "$KEYSTORE_BASE64" ]; then
echo "::error::ANDROID_KEYSTORE_BASE64 secret is not set — cannot sign the release APK."
exit 1
fi
echo "$KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
# Guard against a truncated/corrupt base64 secret silently yielding
# an invalid keystore that fails opaquely later.
if [ "$(stat -c%s "$RUNNER_TEMP/release.jks")" -lt 1000 ]; then
echo "::error::Decoded keystore is suspiciously small — check the base64 secret."
exit 1
fi
{
echo "storeFile=$RUNNER_TEMP/release.jks"
echo "storePassword=$STORE_PASSWORD"
echo "keyAlias=$KEY_ALIAS"
echo "keyPassword=$KEY_PASSWORD"
} > keystore.properties
- name: Make gradlew executable
run: chmod +x web/src-tauri/gen/android/gradlew
- name: Build signed release APK
working-directory: web
# Universal APK (all 4 ABIs) — one file installs on any device. Swap to
# `--split-per-abi` if smaller per-architecture downloads are preferred.
run: npm run tauri -- android build --apk
- name: Publish APK to GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
name: F2P Tracker Android ${{ github.event.inputs.tag || github.ref_name }}
draft: true
prerelease: false
fail_on_unmatched_files: true
files: web/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
body: |
Android build of the F2P Tracker — the same app as the desktop build
and https://free-steam-games.win, packaged as a sideloadable APK.
**Install**
1. Download `app-universal-release.apk`.
2. On your phone, allow "Install unknown apps" for your browser/file
manager when prompted, then open the APK.
3. Updates: install a newer APK over the top — same signing key, so no
uninstall needed.
**Requires Android 11 (API 30) or newer** — older devices are blocked
at install (`INSTALL_FAILED_OLDER_SDK`). Why this floor, the devices
it was chosen on and worldwide version stats: `docs/android-support.md`.
Reads its data from free-steam-games.win (`/api/data`) and keeps the
last verified copy for offline use; no telemetry. See
`docs/DISCLAIMER.md` for accuracy caveats.
Built from commit `${{ steps.source.outputs.sha }}`.