-
Notifications
You must be signed in to change notification settings - Fork 119
135 lines (108 loc) · 3.87 KB
/
deploy-wallet-at-merge-to-main.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
name: Build interface and caches at push to main
on:
push:
branches:
- main
env:
INDEXER_URL: https://indexer.public.heliax.work/internal-devnet-43.35fd77a4447
RPC_URL: https://proxy.public.heliax.work/internal-devnet-43.35fd77a4447
CHAIN_ID: internal-devnet-43.35fd77a4447
CI: false
jobs:
build:
name: Build and deploy Namadillo and extension
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Build Namadillo
working-directory: ./apps/namadillo
run: yarn build
- name: Configure Namadillo
working-directory: ./apps/namadillo
run: |
echo "" > dist/config.toml
echo "indexer_url = \"${{ env.INDEXER_URL }}\"" >> dist/config.toml
echo "rpc_url = \"${{ env.RPC_URL }}\"" >> dist/config.toml
- name: Build the Chrome extension
working-directory: ./apps/extension
run: yarn build:chrome
env:
NAMADA_INTERFACE_NAMADA_CHAIN_ID: ${{ env.CHAIN_ID }}
- name: Build the Firefox extension
working-directory: ./apps/extension
run: yarn build:firefox
env:
NAMADA_INTERFACE_NAMADA_CHAIN_ID: ${{ env.CHAIN_ID }}
- name: Copy the extensions for deployment
run: |
cp apps/extension/build/firefox/namada_keychain-*.zip apps/namadillo/dist/namada-keychain-firefox.zip
cp apps/extension/build/chrome/namada_keychain-*.zip apps/namadillo/dist/namada-keychain-chrome.zip
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: "./apps/namadillo/dist"
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Merged PR ${{ github.event.number }} to main"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN_WALLET_PREVIEW }}
# https://namada-interface-dev.netlify.app/
NETLIFY_SITE_ID: 2380782e-9b20-477a-bc27-b4e9d05e16f3
rust-unit-test-js-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: unit-tests-js
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Compile WASM
run: yarn wasm:build-test
rust-unit-test-wasm-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: unit-tests-wasm
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Install wsrun
run: npm install -g wsrun
- name: Run unit tests
id: run-unit-tests
run: yarn test-wasm:ci
rust-multicore-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Restore Rust cache
uses: ./.github/actions/rust-cache
with:
cache-name: build-multicore
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Build WASM dependencies
working-directory: ./apps/extension
run: yarn wasm:build:multicore