* chore(deps): weekly sweep 2026-11-09 Dependabot #177-#181 combined, plus what Dependabot had not opened, all past the 3-day cooldown: - npm: TanStack Query 5.106.1, vitest + @vitest/coverage-v8 5.1.0, vite 8.3.6, @vitejs/plugin-react 6.2.1, Tailwind 4.3.4, eslint 10.14.0, knip 6.44.1, wrangler 4.158.0 (worker-configuration.d.ts regenerated), jose 6.2.15, globals 17.14.0, lucide-react 1.69.0 - Python (pip-tools on 3.14): soupsieve 4.0.1, coverage 7.17.2, ruff 0.17.4 - Actions: actions/setup-java v6.2.0, sonarqube-scan-action v8.4.1 - cargo: wasm-bindgen 0.2.130 family, log, mime, toml, jiff, cc and others Held back by the cooldown: zustand 5.1.0, TanStack 5.107, jose 6.2.16, knip 6.44.2, Tailwind 4.3.5, flate2 / uuid / smallvec / serde_spanned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(claude): note the 2026-11-09 deps sweep Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
154 lines
6.1 KiB
YAML
154 lines
6.1 KiB
YAML
name: Release Android APK (Tauri)
|
|
|
|
# Builds a signed, sideloadable arm64-v8a APK from the same React + Tauri app
|
|
# that release_desktop.yml ships for desktop.
|
|
#
|
|
# - On a `v*` tag: attaches the APK to the same DRAFT GitHub Release as the
|
|
# desktop installers (nothing is published — release stays a draft until a
|
|
# human publishes it).
|
|
# - On manual dispatch: uploads the APK as a workflow artifact so it can be
|
|
# downloaded and device-tested without cutting a tag.
|
|
#
|
|
# `src-tauri/gen/android` is gitignored and regenerated by `tauri android init`
|
|
# on every run, so signing is done AFTER the build with zipalign + apksigner
|
|
# (no edits to generated Gradle). Order matters: zipalign BEFORE apksigner —
|
|
# re-aligning a signed APK breaks the signature.
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
# Pin the NDK so CI matches local (a floating NDK is a classic
|
|
# "works locally, breaks in CI"). 27.3.x is the current stable LTS and is
|
|
# installed on the dev machine; to match locally, point NDK_HOME at the same
|
|
# version (otherwise Tauri picks the highest installed NDK).
|
|
env:
|
|
NDK_VERSION: '27.3.13750724'
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: release-android-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: '17'
|
|
# No `cache: gradle` — the Gradle project lives in gen/android, which
|
|
# is gitignored and only created later by `tauri android init`, so
|
|
# there are no gradle files at checkout for setup-java to key on
|
|
# (it hard-errors otherwise). Release builds use no caches at all.
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version-file: webapp/.node-version
|
|
# No dependency cache in release builds: a poisoned cache could end
|
|
# up inside signed installers. Releases are rare; take the extra minutes.
|
|
package-manager-cache: false
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
|
with:
|
|
toolchain: stable
|
|
targets: aarch64-linux-android
|
|
|
|
|
|
- name: Set up Android SDK
|
|
uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4.0.4
|
|
|
|
- name: Install NDK + build-tools + platform
|
|
# Tauri 2.11 generates compileSdk/targetSdk = 36, so provision android-36
|
|
# and a matching build-tools (these versions match the dev machine).
|
|
run: |
|
|
sdkmanager "ndk;${NDK_VERSION}" "build-tools;36.1.0" "platforms;android-36" "platform-tools"
|
|
echo "NDK_HOME=$ANDROID_HOME/ndk/${NDK_VERSION}" >> "$GITHUB_ENV"
|
|
|
|
- name: Install npm deps
|
|
working-directory: webapp
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Initialize Android project
|
|
working-directory: webapp
|
|
run: npm run tauri -- android init
|
|
|
|
- name: Build unsigned release APK (arm64-v8a)
|
|
working-directory: webapp
|
|
run: npm run tauri -- android build --apk --target aarch64
|
|
|
|
- name: Sign APK (zipalign -> apksigner)
|
|
id: sign
|
|
working-directory: webapp
|
|
env:
|
|
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
|
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
|
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
run: |
|
|
set -euo pipefail
|
|
# Highest installed build-tools (provides zipalign + apksigner).
|
|
BT=$(ls -d "$ANDROID_HOME"/build-tools/* | sort -V | tail -1)
|
|
VERSION=$(node -p "require('./src-tauri/tauri.conf.json').version")
|
|
OUT="FreeGamesItchio_${VERSION}_arm64-v8a.apk"
|
|
|
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
|
|
|
|
UNSIGNED=$(find src-tauri/gen/android/app/build/outputs/apk \
|
|
-name "*-release-unsigned.apk" | head -1)
|
|
if [ -z "$UNSIGNED" ]; then
|
|
echo "::error::No *-release-unsigned.apk found — build produced no unsigned APK."
|
|
exit 1
|
|
fi
|
|
echo "Unsigned APK: $UNSIGNED"
|
|
|
|
"$BT/zipalign" -v -p 4 "$UNSIGNED" aligned.apk
|
|
"$BT/apksigner" sign \
|
|
--ks "$RUNNER_TEMP/release.jks" \
|
|
--ks-key-alias "$ANDROID_KEY_ALIAS" \
|
|
--ks-pass "pass:$ANDROID_KEYSTORE_PASSWORD" \
|
|
--key-pass "pass:$ANDROID_KEYSTORE_PASSWORD" \
|
|
--out "$OUT" aligned.apk
|
|
"$BT/apksigner" verify --verbose "$OUT"
|
|
rm -f "$RUNNER_TEMP/release.jks" aligned.apk
|
|
|
|
echo "apk_path=webapp/$OUT" >> "$GITHUB_OUTPUT"
|
|
echo "apk_name=$OUT" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload APK as workflow artifact
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: ${{ steps.sign.outputs.apk_name }}
|
|
path: ${{ steps.sign.outputs.apk_path }}
|
|
if-no-files-found: error
|
|
|
|
- name: Attach APK to draft release (tag only)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG: ${{ github.ref_name }}
|
|
REPO: ${{ github.repository }}
|
|
APK_PATH: ${{ steps.sign.outputs.apk_path }}
|
|
run: |
|
|
set -euo pipefail
|
|
# release_desktop.yml's create-release job normally made the draft
|
|
# minutes ago; create it only as a fallback (tolerating a race).
|
|
gh release view "$TAG" --repo "$REPO" >/dev/null 2>&1 \
|
|
|| gh release create "$TAG" --repo "$REPO" --draft --verify-tag \
|
|
--title "Free Itch Games $TAG" --generate-notes \
|
|
|| gh release view "$TAG" --repo "$REPO" >/dev/null
|
|
gh release upload "$TAG" "$APK_PATH" --repo "$REPO" --clobber
|