-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.82 KB
/
build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and deploy
on:
push:
branches:
- main
jobs:
android:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Need full history for git versioning
- name: Create keystore
id: create_keystore
uses: timheuer/[email protected]
with:
fileName: release.keystore
encodedString: "${{ secrets.RELEASE_KEYSTORE_BASE64 }}"
- uses: actions/setup-dotnet@v3
- name: Show .NET info
run: dotnet --info
- name: Install .NET MAUI
run: dotnet workload install maui android wasm-tools
- name: Test
run: dotnet test
- name: Build for Android
run: >
dotnet publish JournalApp\JournalApp.csproj -o publish -c:Release -f:net8.0-android
-p:AndroidKeyStore=True
-p:AndroidSigningKeyStore="${{ steps.create_keystore.outputs.filePath }}"
-p:AndroidSigningStorePass="${{ secrets.RELEASE_KEYSTORE_PASS }}"
-p:AndroidSigningKeyAlias="key"
-p:AndroidSigningKeyPass="${{ secrets.RELEASE_KEYSTORE_PASS }}"
- name: Show build output
run: ls publish
- uses: actions/upload-artifact@v4
with:
path: |
publish
# publish/*.apk
# publish/*.aab
if-no-files-found: error
# - name: Create GitHub release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# publish/*.apk
# publish/*.aab
# fail_on_unmatched_files: true
# generate_release_notes: true
- name: Upload to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: "${{ secrets.SERVICE_ACCOUNT_JSON }}"
packageName: com.danielchalmers.journalapp
releaseFiles: publish/*-Signed.aab
track: beta
status: completed