-
Notifications
You must be signed in to change notification settings - Fork 9
81 lines (71 loc) · 2.56 KB
/
merge.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
# This workflow is intended to run each time a PR is merged on master (since this branch is write protected, we assume the only commits on it are PR merges)
# It's building both test net and main net bundles, then deploying them on corresponding firebase projects
# We assume it has already been unit tested on PR directly
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
jobs:
build_deploy_testnet:
name: Deploy on testnet hosting
runs-on: ubuntu-latest
environment: testnet
steps:
- name: Set up Node version to 18
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install packages
run: yarn && cd src/frontend-elements && yarn
- name: Build the test net bundle
run: yarn build
env:
SASS_PATH: "node_modules:src/styles"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_URL: "https://private-rpc-cm-lum.imperator.co"
- name: Deploy on firebase testnet project
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live
projectId: lum-network
target: lum-network-wallet-testnet
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
build_deploy_mainnet:
name: Deploy on main net hosting
runs-on: ubuntu-latest
environment: mainnet
steps:
- name: Set up Node version to 18
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install packages
run: yarn && cd src/frontend-elements && yarn
- name: Build the main net bundle
run: yarn build
env:
SASS_PATH: "node_modules:src/styles"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_URL: "https://private-rpc-cm-lum.imperator.co"
- name: Deploy on firebase main net project
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live
projectId: lum-network
target: lum-network-wallet
env:
FIREBASE_CLI_PREVIEWS: hostingchannels