-
Notifications
You must be signed in to change notification settings - Fork 11
68 lines (64 loc) · 2.89 KB
/
android-publish.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Release Android
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Setup MAUI android
run: dotnet workload install android
# When running on a self hosted mac runner, the ios workload needs to be installed due to csproj configuration
- name: Setup MAUI iOS
if: ${{ runner.os == 'macOS' }}
run: dotnet workload install ios
- name: Setup MAUI
run: dotnet workload restore
- name: Restore dependencies
run: dotnet restore -p:TargetFramework=net9.0-android
- name: Put keystore
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
run: echo "${ANDROID_KEYSTORE_BASE64}" | base64 -d > liftlog.keystore
working-directory: ./LiftLog.Maui
- uses: mlilback/build-number@v1
name: Set build number
id: buildNumber
with:
base: 100
run-id: ${{github.run_number}}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: "microsoft"
java-version: "17"
- name: Setup Android SDK Tools
uses: android-actions/[email protected]
- name: Build Tailwind
run: npm i && npm run build
working-directory: ./LiftLog.Ui
- name: Build UI # Seems that the typescript built files dont get copied to the publish folder unless we build the project first
run: dotnet build -c Release
working-directory: ./LiftLog.Ui
- name: Build
run: dotnet publish -p:TargetFramework=net9.0-android -f net9.0-android -c Release -p:CompressionEnabled=false -p:BuildFor=android -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=liftlog.keystore -p:AndroidSigningKeyAlias=liftlog -p:AndroidSigningKeyPass=env:KEYSTORE_PASS -p:AndroidSigningStorePass=env:KEYSTORE_PASS -p:UseSentryCLI=true -p:ApplicationDisplayVersion=${{ github.event.release.name }} -p:ApplicationVersion=${{ steps.buildNumber.outputs.build-number }}
working-directory: ./LiftLog.Maui
env:
KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Upload Android Release to Play Store
uses: r0adkll/[email protected]
with:
packageName: com.limajuice.liftlog
releaseFiles: LiftLog.Maui/bin/Release/net9.0-android/publish/com.limajuice.liftlog-Signed.aab
track: internal
status: completed
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
whatsNewDirectory: release_notes