-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add GitHub Actions script to build APK and upload it to artifacts
- Loading branch information
1 parent
ff0e4f5
commit 1c34c44
Showing
1 changed file
with
32 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,32 @@ | ||
name: Build | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build_android: | ||
name: Android | ||
environment: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
- name: Add keystore | ||
run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > android/localmaterialnotes_keystore.jks | ||
- name: Add key properties | ||
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > android/key.properties | ||
- name: Build app | ||
run: flutter build apk --release | ||
- name: Archive APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: CPM | ||
path: build/app/outputs/flutter-apk/app-release.apk |