Skip to content

Commit 2729251

Browse files
Changing build to use signing keys and store the artifact
1 parent f0c5b4e commit 2729251

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@ jobs:
3535
distribution: 'temurin'
3636
java-version: '17'
3737
- uses: subosito/flutter-action@v2
38+
# Prepare Keystore (decode and save it)
39+
- name: Decode Keystore
40+
run: |
41+
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > ./android/app/key.jks
42+
43+
# Set up key.properties file
44+
- name: Set up key.properties file
45+
run: |
46+
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" > $GITHUB_WORKSPACE/android/key.properties
47+
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> $GITHUB_WORKSPACE/android/key.properties
48+
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> $GITHUB_WORKSPACE/android/key.properties
49+
echo "storeFile=key.jks" >> $GITHUB_WORKSPACE/android/key.properties
50+
3851
- run: flutter pub get
3952
- run: flutter clean
40-
- run: flutter build appbundle --debug
53+
- run: flutter build appbundle
54+
- name: Archive android app file.
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: openshock.aab
58+
path: build/app/outputs/bundle/release/app-release.aab

0 commit comments

Comments
 (0)