ci(android,release): publish the signed APK with each release

This commit is contained in:
nvrl committed 2026-10-03 02:45:13 +02:00
1 parent 78ffafe21a
commit 2275df40a8
3 files changed
+57 -28

No files matched your search

+27 -5
View File
@@ -3,7 +3,15 @@ name: Android
on:
push:
branches: [main]
tags: ['v*']
# A `v*` tag reaches this workflow through release.yml, which calls it and
# publishes the signed APK. Triggering on the tag here as well would build
# the release twice.
workflow_call:
inputs:
signed_release:
required: false
default: false
type: boolean
pull_request:
paths:
- 'android/**'
@@ -188,10 +196,24 @@ jobs:
- name: Build signed APK and AAB
run: bash scripts/build-android.sh signed
# The APK bundles a GPL libmpv, so its corresponding source ships next to
# it. The AAB is for Play only and stays out of the GitHub release.
- name: Stage release files
run: |
version="$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -n1)"
mkdir -p dist/android
cp android/app/build/outputs/apk/release/app-release.apk \
"dist/android/proton-stream-$version-android.apk"
cp android/app/build/generated/mpv/mpv-android-source-*.tar.gz dist/android/
- uses: actions/upload-artifact@v7
with:
name: android-signed
path: |
android/app/build/outputs/apk/release/*.apk
android/app/build/outputs/bundle/release/*.aab
name: android
path: dist/android/*
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: android-bundle
path: android/app/build/outputs/bundle/release/*.aab
if-no-files-found: error
+23 -18
View File
@@ -20,9 +20,6 @@ permissions:
env:
CARGO_TERM_COLOR: always
# Android remains a workflow artifact only until the native libmpv adapter,
# corresponding-source bundle, and on-device verification are complete.
ANDROID_PUBLIC_RELEASE_ENABLED: 'false'
jobs:
verify:
@@ -60,11 +57,6 @@ jobs:
! grep -q '^\[patch\.crates-io\]' Cargo.toml ||
{ echo "::error::Cargo.toml carries [patch.crates-io]; releases build against the registry"; exit 1; }
- name: Android publication remains blocked
run: |
test "$ANDROID_PUBLIC_RELEASE_ENABLED" = false
echo "Android APK/AAB publication is blocked until native playback is release-ready."
linux:
name: Linux artifacts
needs: verify
@@ -148,25 +140,38 @@ jobs:
dist/*.msi
if-no-files-found: error
# The signed APK plus the corresponding source of the libmpv it bundles. The
# keystore and its passwords come from the ANDROID_RELEASE_* secrets.
android:
name: Android
needs: verify
uses: ./.github/workflows/android.yml
with:
signed_release: true
secrets: inherit
publish:
name: Publish desktop artifacts
name: Publish
if: startsWith(github.ref, 'refs/tags/')
needs: [linux, windows]
needs: [linux, windows, android]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
# By name: the Android workflow also uploads the AAB, which is for Play
# and does not belong on the release.
- uses: actions/download-artifact@v8
with:
name: linux
path: artifacts
- uses: actions/download-artifact@v8
with:
name: windows
path: artifacts
- uses: actions/download-artifact@v8
with:
name: android
path: artifacts
merge-multiple: true
- name: Refuse mobile artifacts while Android publishing is blocked
run: |
if find artifacts -type f \( -name '*.apk' -o -name '*.aab' \) -print -quit | grep -q .; then
echo "::error::Android publishing is disabled while native playback remains incomplete"
exit 1
fi
- name: Checksums
run: |