generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 39
67 lines (60 loc) · 1.78 KB
/
android-continous-deployment.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
name: Build Android apk
on:
workflow_dispatch:
inputs:
comments:
description: 'Comments'
required: true
default: 'Manual build Actions'
push:
branches:
- develop
jobs:
build-android-apk:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Getting the repo
uses: actions/checkout@v2
- name: Installing Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install React Native CLI
run: |
yarn global add react-native-cli
- name: Install yarn dependencies
run: |
yarn install
- name: Create config file
run: |
cp ./config/config.sample.js ./config/config.js
- name: Find and Replace clientId
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<client-id>'
replace: ${{ secrets.CLIENT_GITHUB_ID }}
include: 'config/config.js'
regex: true
- name: Find and Replace clientSecret
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<client-secret>'
replace: ${{ secrets.CLIENT_GITHUB_SECRET }}
include: 'config/config.js'
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build Android Release
run: |
cd android && ./gradlew assembleRelease --no-daemon
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: app-release.apk
path: android/app/build/outputs/apk/release/
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: app-release.apk