Merge pull request #2 from 100Daisy/staging #23
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: "Android Build" | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
- name: Install Node modules | |
run: npm ci | |
- name: Cache Gradle Wrapper | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Make Gradlew Executable | |
run: cd android && chmod +x ./gradlew | |
# Build Command | |
- name: Build Android Release | |
run: | | |
cd android && ./gradlew assembleRelease --no-daemon | |
# Upload to Artifact | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release Build | |
path: "android/app/build/outputs/apk/release/app-release.apk" |