-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend: Add APK generation workflow
- Loading branch information
1 parent
595681a
commit 78689df
Showing
9 changed files
with
101 additions
and
30 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name: Deploy Flutter Web Frontend | ||
name: Deploy Flutter Frontend Apps | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
paths: | ||
- '.github/workflows/publish_frontend_web.yaml' | ||
- '.github/workflows/publish_frontend.yaml' | ||
- 'core/**' | ||
- 'frontend/**' | ||
workflow_dispatch: | ||
|
@@ -20,10 +20,16 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- name: Cache Flutter packages | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.pub-cache | ||
|
@@ -60,6 +66,27 @@ jobs: | |
working-directory: ./frontend | ||
run: flutter pub run build_runner build --delete-conflicting-outputs | ||
|
||
- name: Decode Keystore | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'keystore.jks' | ||
fileDir: './frontend/android/app/' | ||
encodedString: ${{ secrets.KEYSTORE_BASE64 }} | ||
|
||
- name: Build APK | ||
working-directory: ./frontend | ||
env: | ||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
run: flutter build apk --release | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-apk | ||
path: frontend/build/app/outputs/flutter-apk/app-release.apk | ||
|
||
- name: Build web app | ||
working-directory: ./frontend | ||
run: flutter build web --dart-define APP_ENV=production --base-href /down_the_aisle/ | ||
|
@@ -69,3 +96,11 @@ jobs: | |
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./frontend/build/web | ||
|
||
- name: Create Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: frontend/build/app/outputs/flutter-apk/app-release.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Empty file.
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
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
2 changes: 1 addition & 1 deletion
2
...tlin/com/example/frontend/MainActivity.kt → ...n/kotlin/app/downtheaisle/MainActivity.kt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.example.frontend | ||
package app.downtheaisle | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
|
||
|
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip |
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