Skip to content

Commit

Permalink
feat(actions): build apk with signing key
Browse files Browse the repository at this point in the history
  • Loading branch information
lambiengcode committed Nov 3, 2023
1 parent 03f6aee commit a9c3f95
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
test:
name: Analyze project
name: 🛠 Analyze project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -30,7 +30,7 @@ jobs:

build_apk:
needs: [test]
name: Build & Release APK
name: 🔧 Build & 📦 Release APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -48,8 +48,14 @@ jobs:
with:
flutter-version: "3.13.9"
cache: true
- run: flutter clean
- run: flutter pub get
- run: flutter build apk --release
- name: 🔧 Build APK
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_WATERBUS_PASSWORD: ${{ secrets.KEY_WATERBUS_PASSWORD }}
ALIAS_WATERBUS_PASSWORD: ${{ secrets.ALIAS_WATERBUS_PASSWORD }}
run: base64 -d <<< $KEY_JKS > ./android/app/waterbus.jks && flutter build apk --release -v
- name: Create a Release APK
uses: ncipollo/release-action@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ android {

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
storeFile file('waterbus.jks')
storePassword "$System.env.KEY_WATERBUS_PASSWORD"
keyAlias 'upload'
keyPassword "$System.env.ALIAS_WATERBUS_PASSWORD"
}
}

Expand Down

0 comments on commit a9c3f95

Please sign in to comment.