Release 0.16.1 #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Android (Release) | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_release: | |
name: Build Android Example App (release, new architecture) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
- name: Install npm dependencies (bun) | |
run: bun install | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
java-package: jdk | |
- name: Restore Gradle cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Run Gradle Build for example/android/ | |
working-directory: example/android | |
run: ./gradlew assembleRelease --no-daemon --build-cache | |
- name: Upload APK to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: example/android/app/build/outputs/apk/release/app-release.apk | |
asset_name: "NitroExample-v${{ github.event.release.tag_name }}.apk" | |
asset_content_type: application/vnd.android.package-archive | |
# Gradle cache doesn't like daemons | |
- name: Stop Gradle Daemon | |
working-directory: example/android | |
run: ./gradlew --stop |