-
-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (67 loc) · 2.83 KB
/
release.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
71
72
73
74
name: Create release
on:
push:
tags:
- v*
jobs:
build:
name: Create release
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- name: Prepare keystore
run: echo ${{ secrets.android_keystore_base64 }} | base64 -d >$GITHUB_WORKSPACE/keystore.jks
- name: Build signed package (APK)
# AboutLibraries 10.6.3 doesn't show any dependencies when configuration cache is used
run: ./gradlew --no-configuration-cache --no-daemon app:assembleRelease
env:
ANDROID_KEYSTORE: ${{ github.workspace }}/keystore.jks
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.android_keystore_password }}
ANDROID_KEY_ALIAS: ${{ secrets.android_key_alias }}
ANDROID_KEY_PASSWORD: ${{ secrets.android_key_password }}
- name: Build signed bundle (AAB)
# AboutLibraries 10.6.3 doesn't show any dependencies when configuration cache is used
run: ./gradlew --no-configuration-cache --no-daemon app:bundleRelease
env:
ANDROID_KEYSTORE: ${{ github.workspace }}/keystore.jks
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.android_keystore_password }}
ANDROID_KEY_ALIAS: ${{ secrets.upload_key_alias }}
ANDROID_KEY_PASSWORD: ${{ secrets.upload_key_password }}
- name: Create Github release (from standard flavor)
id: create_release
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
files: app/build/outputs/apk/standard/release/*.apk
generate_release_notes: true
fail_on_unmatched_files: true
# - uses: cardinalby/git-get-release-action@v1
# id: get_release
# env:
# GITHUB_TOKEN: ${{ github.token }} # or your personal access token
# with:
# id: ${{ steps.create_release.outputs.id }}
# - name: Write release notes
# run: |
# mkdir -p release-notes
# touch release-notes/whatsnew-en-US
# echo ${{ steps.get_release.outputs.body }} >> release-notes/whatsnew-en-US
- name: Upload to Google Play (gplay flavor)
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.google_play_service_account_json }}
packageName: at.bitfire.icsdroid
releaseFiles: app/build/outputs/bundle/gplayRelease/*.aab
mappingFile: app/build/outputs/mapping/gplayRelease/mapping.txt
track: internal
status: completed
# whatsNewDirectory: release-notes