-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (95 loc) · 3.21 KB
/
build-android.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
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build Android
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
NEARBY_MESSAGES_API_KEY: '${{ secrets.NEARBY_MESSAGES_API_KEY }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
SUPPLY_JSON_KEY_DATA: '${{ secrets.SUPPLY_JSON_KEY_DATA }}'
STORE_PASSWORD: '${{ secrets.STORE_PASSWORD }}'
KEYSTORE_ALIAS: '${{ secrets.KEYSTORE_ALIAS }}'
KEYSTORE_PASSWORD: '${{ secrets.KEYSTORE_PASSWORD }}'
GIT_SSH_PRIVATE_KEY: '${{ secrets.GIT_SSH_PRIVATE_KEY }}'
steps:
- uses: actions/checkout@v3
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Thomas Hoang"
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
known_hosts: unnecessary
key: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
- name: Switch to SSH Git
run: git remote set-url origin [email protected]:Maius-Protocol/maius-fun.git
- run: ssh -T [email protected] || true
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.4
bundler-cache: true
- name: Install Java
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "adopt"
cache: "gradle"
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'yarn'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install NPM dependencies
run: yarn install # if you use npm then please change it to npm
- name: Test Ruby
run: ruby -v
- name: Test Node
run: node -v
- name: Test NPM packages
run: yarn react-native --version
- name: Create ENV File
run: cat .env.template | envsubst > .env
- name: Install fastlane
run: cd android && bundle install && cd ..
- name: Deploy
run: cd android && fastlane android deploy
# - name: Restore Pods cache
# uses: actions/cache@v2
# with:
# path: |
# ios/Pods
# ~/Library/Caches/CocoaPods
# ~/.cocoapods
# key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
#
# - name: Install Pods
# run: cd ios && pod install && cd ..
#
# - name: Releasing application
# run: cd ios && fastlane ios beta