-
Notifications
You must be signed in to change notification settings - Fork 50
99 lines (81 loc) · 2.48 KB
/
binance.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
name: binance release
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the binance branch
push:
branches: [binance]
jobs:
test:
name: Test release
strategy:
matrix:
node: ['20.x']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.ALPHA_SSH_KEY }}
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Pre-build setup
run: npm run pre-build
- name: Run lint
run: npm run lint
- name: Running unit tests with coverage
run: npm run test:coverage-codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
VUE_APP_INFURA_KEY: ${{ secrets.VUE_APP_INFURA_KEY }}
build-deploy-binance:
name: Build & deploy binance.tor.us
strategy:
matrix:
node: ['20.x']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.ALPHA_SSH_KEY }}
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Install dependencies
run: npm install
- name: Run build
run: |
. ./scripts/setup.sh
npm version patch -m 'Updating version to %s [skip ci]'
npm run build
. ./scripts/gitPush.sh
env:
VUE_APP_INFURA_KEY: ${{ secrets.VUE_APP_INFURA_KEY }}
GITHUB_SSH_KEY: ${{ secrets.ALPHA_SSH_KEY }}
- name: 'Delete sourcemaps'
run: rm ./dist/js/*.js.map
# Upload to S3
- name: Run AWS actions
run: |
. ./scripts/uploadToAws.sh
. ./scripts/updateLambda.sh
. ./scripts/updateIframeIntegrity.sh
env:
GITHUB_SSH_KEY: ${{ secrets.ALPHA_SSH_KEY }}
CLOUDFRONT_BINANCE_DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_BINANCE_TOR_US }}