No retention-days was set, so every build artifact defaulted to GitHub's 90-day maximum. That's most of why several old builds (July 4th) were still consuming the account's shared 0.5 GB Actions storage quota two weeks later. 7 days is still ample time to grab a build from the Actions page.
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Build APK
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "17"
|
|
|
|
- name: Set up Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Install required SDK packages
|
|
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
|
|
|
|
- name: Cache Gradle
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build release APK
|
|
run: ./gradlew assembleRelease --stacktrace
|
|
|
|
- name: Upload APK artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: TurnProxy-apk
|
|
path: app/build/outputs/apk/release/*.apk
|
|
if-no-files-found: error
|
|
retention-days: 7
|