-
Notifications
You must be signed in to change notification settings - Fork 0
189 lines (158 loc) · 5.13 KB
/
master.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
on:
push:
branches:
- master
name: Master
jobs:
check:
name: Check Version
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.check.outputs.changed }}
version: ${{ steps.check.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js v14
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Check Version
id: check
uses: EndBug/version-check@v1
with:
diff-search: true
token: ${{ secrets.GITHUB_TOKEN }}
release:
name: Release Archive
needs: check
if: needs.check.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.check.outputs.version }}
release_name: Release v${{ needs.check.outputs.version }}
web:
name: Web Build
needs: check
if: needs.check.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js v14
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Set Secrets
env:
NPMRC: ${{ secrets.NPMRC }}
run: |
echo "$NPMRC" >> .npmrc
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run web:build
- name: Publish to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: node ./.scripts/s3Push.js
android:
name: Android Build
needs: check
if: needs.check.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js v14
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Uninstall Android build tools v31
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall "build-tools;31.0.0" --sdk_root=${ANDROID_SDK_ROOT}
- name: Set Secrets
env:
NPMRC: ${{ secrets.NPMRC }}
CORDOVA_BUILD: ${{ secrets.CORDOVA_BUILD }}
CORDOVA_KEYSTORE: ${{ secrets.CORDOVA_KEYSTORE }}
run: |
echo "$NPMRC" >> .npmrc
echo "$CORDOVA_BUILD" >> ./src-cordova/build.json
echo "$CORDOVA_KEYSTORE" >> ./src-cordova/prod.keystore
- name: Install Dependencies
run: |
npm ci
npm install -g cordova@9
- name: Prepare Cordova
run: |
npm run cordova:version
npm run cordova:prepare
- name: Build
run: npm run android:build
- name: Publish to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: com.zachcardoza.gcc.awana
releaseFile: 'src-cordova/platforms/android/app/build/outputs/apk/release/app-release.apk'
track: beta
ios:
name: iOS Build
needs: check
if: needs.check.outputs.changed == 'true'
runs-on: macOS-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js v14
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Set Secrets
env:
NPMRC: ${{ secrets.NPMRC }}
CORDOVA_BUILD: ${{ secrets.CORDOVA_BUILD }}
run: |
echo "$NPMRC" >> .npmrc
echo "$CORDOVA_BUILD" >> ./src-cordova/build.json
- name: Import Code-Signing Certs and Keys
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_CODE_SIGNING_CERT_P12_B64 }}
p12-password: ${{ secrets.APPLE_CODE_SIGNING_CERT_P12_PASSWORD }}
- name: Import Provisioning Profiles
uses: Apple-Actions/download-provisioning-profiles@v1
with:
bundle-id: com.zachcardoza.gcc.awana
issuer-id: ${{ secrets.APPLE_STORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPLE_STORE_KEY_ID }}
api-private-key: ${{ secrets.APPLE_STORE_PRIVATE_KEY }}
- name: Install Dependencies
run: |
npm ci
npm install -g cordova@9
- name: Prepare Cordova
run: |
npm run cordova:version
npm run cordova:prepare
- name: Build
run: npm run ios:build:cli
- name: Push to TestFlight
uses: Apple-Actions/upload-testflight-build@master
with:
app-path: "src-cordova/platforms/ios/build/device/GCC Awana.ipa"
issuer-id: ${{ secrets.APPLE_STORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPLE_STORE_KEY_ID }}
api-private-key: ${{ secrets.APPLE_STORE_PRIVATE_KEY }}