-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (66 loc) ยท 2.56 KB
/
AOS-distribute.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
name: AOS-distribute
on:
push:
branches:
- distribute
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- name: Create Properties File
env:
RELEASE_KEYSTORE: ${{ secrets.KEY_STORE_BASE_64 }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "$RELEASE_KEYSTORE" | base64 -d > AOS/app/release.keystore
echo "$KEYSTORE_PROPERTIES" > AOS/keystore.properties
echo "$LOCAL_PROPERTIES" > AOS/local.properties
- name: Create google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > AOS/app/google-services.json
- name: Build Release AAB
run: ./gradlew bundleRelease
working-directory: ./AOS
- name: Upload AAB
uses: actions/upload-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/app-release.aab
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download AAB
uses: actions/download-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/
- name: Create service_account.json
run: echo '${{ secrets.GOOGLE_PLAY_STORE_SERVICE_ACCOUT }}' > service_account.json
- name: Extract Release Version
run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
id: extract_version_name
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_version_name.outputs.version }}
release_name: ${{ steps.extract_version_name.outputs.version }}
files: |
AOS/app/build/outputs/bundle/release/app-release.aab
- name: Deploy to Google Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: boostcamp.and07.mindsync
releaseName: ${{ steps.extract_version_name.outputs.version }}
releaseFiles: AOS/app/build/outputs/bundle/release/app-release.aab
track: production
whatsNewDirectory: AOS/whatsNewDirectory