Files
ppsspp/.github/workflows/manual_generate_apk.yml
dependabot[bot]andGitHub d37ca94eb7 Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 08:47:20 +00:00

82 lines
2.6 KiB
YAML

name: Manual Generate Android APK
on:
workflow_dispatch:
inputs:
buildVariant:
type: choice
description: 'Build Variant'
required: true
default: 'NormalOptimized'
options:
- NormalOptimized
- NormalDebug
- VROptimized
- VRDebug
- LegacyOptimized
jobs:
apk:
name: Generate ${{ github.event.inputs.buildVariant }} APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Check Valid Version Tags
id: valid-tags
shell: bash
run: |
echo "count=$(git tag -l 'v[0-9]*' | wc -l | tr -d ' ')" >> $GITHUB_OUTPUT
- name: Fetch upstream tags # required for git describe to return a valid version and to preevnt androidGitVersion from crashing on a new fork
if: steps.valid-tags.outputs.count == '0'
run: |
# TODO: should try to fetch tags from whereever this repo was forked from before fetching from official repo
git remote add upstream https://github.com/hrydgard/ppsspp.git # fetching from official repo as a fallback
git fetch --deepen=15000 --no-recurse-submodules --tags --force upstream || exit 0
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
#- name: Setup SDK # gradlew will install SDK automatically, thus this step not needed
# uses: android-actions/setup-android@v3
#- name: Setup NDK # gradle will install NDK (side by side) automatically, thus explictly seting up NDK here will cause not enough storage issue when building debug variant
# uses: nttld/setup-ndk@v1
# with:
# ndk-version: r21e
- name: Test androidGitVersion
run: |
echo "count=${{steps.valid-tags.outputs.count}}"
gradle --quiet androidGitVersion
- name: Assemble APK
run: ./gradlew assemble${{ github.event.inputs.buildVariant }} --stacktrace
#- name: Gradle Test
# run: bash ./gradlew test${{ github.event.inputs.buildVariant }}UnitTest --stacktrace
- name: Package build
run: |
find . -name "*.apk"
mkdir ppsspp
if [ -e android/build/*/apk/*/*/*.apk ]; then
cp android/build/*/apk/*/*/*.apk ppsspp/
fi
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: android-${{ github.event.inputs.buildVariant }} build
path: ppsspp/