Skip to content

Commit 18b64d7

Browse files
committed
Android AAB build in CI pipeline
1 parent d65b294 commit 18b64d7

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/dotnet-android.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,32 @@ jobs:
3535
- name: Restore NuGet packages
3636
run: dotnet restore $App_Project_File
3737

38-
- name: Build and create APK
39-
run: dotnet build --no-restore --configuration ${{ matrix.configuration }} $App_Project_File
38+
- name: Decode Keystore
39+
run: |
40+
echo "${{ secrets.BASE64_ENCODED_JKS }}" | base64 --decode > src/Vocup.Android/vocup-android.jks
41+
42+
- name: Build and create AAB
43+
if: matrix.configuration == 'Debug'
44+
run: |
45+
dotnet build \
46+
--no-restore \
47+
--configuration ${{ matrix.configuration }} \
48+
$App_Project_File
49+
50+
- name: Build and create signed AAB
51+
if: matrix.configuration == 'Release'
52+
run: |
53+
dotnet build \
54+
--no-restore \
55+
--configuration ${{ matrix.configuration }} \
56+
-p:AndroidKeyStore=True \
57+
-p:AndroidSigningStorePass=${{ secrets.JKS_PASSWORD }} \
58+
-p:AndroidSigningKeyPass=${{ secrets.JKS_PASSWORD }} \
59+
$App_Project_File
60+
61+
- name: Upload build artifacts
62+
if: matrix.configuration == 'Release' && startsWith(github.ref, 'refs/tags/')
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: AAB
66+
path: src/Vocup.Android/bin/Release/net9.0-android/org.vocup-Signed.aab

0 commit comments

Comments
 (0)