-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (64 loc) · 2.22 KB
/
ubuntu_build_test.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
name: Test build on Ubuntu
on:
push:
branches:
- develop
pull_request:
branches:
- develop
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Caching node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-treemapper-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-treemapper-
- name: Upgrade npm to latest version
run: sudo npm i -g npm@latest
- name: Install react-native CLI
run: "sudo npm install -g react-native-cli"
- name: Install npm dependencies
run: npm install --legacy-peer-deps
- name: Linting
run: npm run lint:errors
- name: Setting Environment Variables
env:
MAPBOXGL_ACCCESS_TOKEN: ${{ secrets.MAPBOXGL_ACCCESS_TOKEN }}
BUGSNAP_CLIENT_KEY: ${{ secrets.BUGSNAP_CLIENT_KEY }}
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
API_ENDPOINT: ${{ secrets.API_ENDPOINT }}
CDN_URL: ${{ secrets.CDN_URL }}
WEB_APP_URL: ${{ secrets.WEB_APP_URL }}
run: |
echo "MAPBOXGL_ACCCESS_TOKEN=$MAPBOXGL_ACCCESS_TOKEN" >> .env
echo "BUGSNAP_CLIENT_KEY=$BUGSNAP_CLIENT_KEY" >> .env
echo "AUTH0_DOMAIN=$AUTH0_DOMAIN" >> .env
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env
echo "API_ENDPOINT=$API_ENDPOINT" >> .env
echo "CDN_URL=$CDN_URL" >> .env
echo "WEB_APP_URL=$WEB_APP_URL" >> .env
- name: Build Android app
run: |
react-native bundle \
--platform android \
--dev false \
--entry-file index.js \
--bundle-output android-release.bundle \
--sourcemap-output android-release.bundle.map
- name: Build iOS app
run: |
react-native bundle \
--platform ios \
--dev false \
--entry-file index.js \
--bundle-output ios-release.bundle \
--sourcemap-output ios-release.bundle.map