forked from akshay9/librephotos-mobile
-
Notifications
You must be signed in to change notification settings - Fork 7
101 lines (88 loc) · 3.14 KB
/
main-cd.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Beta Distribution
on:
push:
branches:
- main
jobs:
beta-distribution:
runs-on: ubuntu-latest
name: Beta Distribution
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@master
- uses: c-hive/gha-yarn-cache@v2
- name: Install node modules
run: |
yarn install
- name: Run test
run: |
yarn lint
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
# - name: Build Android App Bundle
# run: |
# cd android && ./gradlew bundleRelease --no-daemon
- name: Build Android App APK
run: |
cd android && ./gradlew assembleRelease --no-daemon
# - name: Sign App Bundle
# id: sign_app
# uses: r0adkll/sign-android-release@v1
# with:
# releaseDirectory: android/app/build/outputs/bundle/release
# signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
# alias: ${{ secrets.ANDROID_SIGNING_ALIAS }}
# keyStorePassword: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
# keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
- name: Sign App APK
id: sign_apk
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_SIGNING_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
- name: Rename Android App APK
run: cp $SIGNED_FILE librephotos-latest-signed.apk
env:
SIGNED_FILE: ${{ steps.sign_apk.outputs.signedReleaseFile }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Signed Apk Bundle
path: librephotos-latest-signed.apk
- name: Create APK Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
draft: false
title: "Latest Release"
files: |
librephotos-latest-signed.apk
# - name: Deploy to Play Store (BETA)
# uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT }}
# packageName: com.testedapp
# releaseFile: ${{steps.sign_app.outputs.signedReleaseFile}}
# track: beta
# inAppUpdatePriority: 3
# userFraction: 0.5
# whatsNewDirectory: android/release-notes/
# # mappingFile: android/app/build/outputs/mapping/release/mapping.txt