-
Notifications
You must be signed in to change notification settings - Fork 31
74 lines (60 loc) · 2.18 KB
/
build-and-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: Build and Release
on:
push:
branches:
- master
tags:
- "v*"
jobs:
apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Set execution flag for gradlew
run: chmod +x gradlew
- name: Decode Keystore File
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > ${{ github.workspace }}/my-release-key.keystore
- name: List files in the APK directory
run: ls -Rla ./
- name: Build APK
run: |
./gradlew assembleNoAnalyticsRelease \
-Pandroid.injected.signing.store.file=${{ github.workspace }}/my-release-key.keystore \
-Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \
-Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \
-Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} \
--stacktrace
- name: Rename APK
run: mv presentation/build/outputs/apk/noAnalytics/release/QUIK-v*-noAnalytics-release.apk presentation/build/outputs/apk/noAnalytics/release/QUIK-noAnalytics-release.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: presentation/build/outputs/apk/noAnalytics/release/QUIK-noAnalytics-release.apk
release:
name: Release APK
needs: apk
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download APK from build
uses: actions/download-artifact@v3
with:
name: apk
- name: List files in the APK directory
run: ls -Rla ./
- name: Create and upload release
uses: softprops/action-gh-release@v1
with:
files: QUIK-noAnalytics-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate Fastlane Supply Metadata
uses: ashutoshgngwr/[email protected]