Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "Build Android app" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 18 | ||
distribution: adopt | ||
cache: gradle | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'yarn' | ||
|
||
- name: Run Yarn Install | ||
run: | | ||
npm i -g corepack | ||
yarn install | ||
- name: Build application | ||
run: | | ||
cd android | ||
./gradlew assembleRelease | ||
- name: Upload application | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: app | ||
path: android/app/build/outputs/apk/release/*.apk | ||
retention-days: 3 | ||
|
||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: android/app/build/outputs/apk/release/* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true |