This repository was archived by the owner on Apr 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
122 lines (96 loc) · 3.36 KB
/
Copy pathci.yml
File metadata and controls
122 lines (96 loc) · 3.36 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Continuous Integration
env:
BUILD_NUMBER: ${{ github.run_number }}
on:
push:
branches: [ "production" ]
pull_request:
concurrency:
group: build-android-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🚚 Checkout PR
uses: actions/checkout@v3
- name: ☕️ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
cache: gradle
- name: 🙌 Copy secrets file
run: cp ./secrets.properties.example ./secrets.properties
- name: 📑 Create Google Services file
env:
GOOGLE_SERVICES_JSON_64: ${{ secrets.GOOGLE_SERVICES_JSON_64 }}
run: echo $GOOGLE_SERVICES_JSON_64 | base64 -di > ./app/google-services.json
- name: 📝 Grant execute permission for gradlew
run: chmod +x gradlew
- name: 👷♀️ Build with Gradle
run: ./gradlew build
- name: 🛜 Upload reports
if: always()
uses: actions/upload-artifact@v3.1.2
with:
name: Lint Results
path: app/build/reports/lint-results-debug.html
check-gradle-wrapper:
runs-on: ubuntu-latest
steps:
- name: 🚚 Checkout PR
uses: actions/checkout@v3
- name: 🌯 Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.6
deploy-app:
runs-on: ubuntu-latest
environment: Google Play Store Deployment
needs: [build, check-gradle-wrapper]
if: ${{ github.event_name == 'push' && github.ref_name == 'production' }}
steps:
- name: 🚚 Checkout PR
uses: actions/checkout@v3
- name: ☕️ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'liberica'
cache: gradle
- name: 🙌 Copy secrets file
env:
SECRETS_PROPERTIES_64: ${{ secrets.SECRETS_PROPERTIES_64 }}
run: echo $SECRETS_PROPERTIES_64 | base64 -di > ./secrets.properties
- name: 📑 Create Google Services file
env:
GOOGLE_SERVICES_JSON_64: ${{ secrets.GOOGLE_SERVICES_JSON_64 }}
run: echo $GOOGLE_SERVICES_JSON_64 | base64 -di > ./app/google-services.json
- name: 📝 Grant execute permission for gradlew
run: chmod +x gradlew
- name: 📑 Create keystore file
env:
KEYSTORE_64: ${{ secrets.KEYSTORE_64 }}
run: echo $KEYSTORE_64 | base64 -di > ./keys/release-keystore.jks
- name: 👷♀️ Bundle Release
id: bundleRelease
env:
STORE_PASS: ${{ secrets.STORE_PASS }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
run: ./gradlew bundleRelease
- name: 🛜 Upload Android Release to Play Store
uses: r0adkll/upload-google-play@v1.1.1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.drspaceboo.transtracks
releaseFiles: ${{ vars.RELEASE_BUNDLE_PATH }}
track: alpha
mappingFile: ${{ vars.RELEASE_MAPPING_PATH }}
- name: 🔖 Tag release
env:
TAG_NAME: 'v${{ steps.bundleRelease.outputs.VERSION_NAME }}'
run: |
git config --global user.name "Continuous Integration"
git config --global user.email "username@users.noreply.github.com"
git tag "$TAG_NAME"
git push origin "$TAG_NAME"