forked from AdaptiveConsulting/ReactiveTraderCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (101 loc) · 3.22 KB
/
tag.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
name: Tag
on:
push:
tags:
- v*
defaults:
run:
working-directory: packages/client
env:
BUCKET_WEB: reactive-trader-web-builds
BUCKET_OPENFIN: reactive-trader-openfin-builds
BUCKET_FINSEMBLE: reactive-trader-finsemble-builds
BUCKET_LAUNCHER: reactive-trader-launcher-builds
ENVIRONMENT: prod
jobs:
build:
name: Build & deploy
runs-on: ubuntu-20.04
if: github.repository_owner == 'AdaptiveConsulting'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Node version
uses: actions/setup-node@v3
with:
node-version: 20
- name: Set variables
id: vars
run: echo "TAG=$(git describe --tag --abbrev=0)" >> $GITHUB_OUTPUT
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCLOUD_SERVICE_ACCOUNT_JSON }}"
- name: Set up GCloud
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
- name: Install
run: npm ci
- name: Verify Quality (type checking, linting, format checking, tests)
run: |
npm run verify
- name: Build (web)
env:
DOMAIN: https://web.prod.reactivetrader.com
VITE_BUILD_VERSION: ${{ steps.vars.outputs.TAG }}
run: |
npm run build
npm run storybook:build
- name: Deploy (web)
run: |
gsutil -m \
-h "Cache-Control: no-cache" \
rsync -d -r dist \
gs://$BUCKET_WEB/tag/${{ steps.vars.outputs.TAG }}
- name: Build (OpenFin)
env:
DOMAIN: https://openfin.prod.reactivetrader.com
VITE_BUILD_VERSION: ${{ steps.vars.outputs.TAG }}
run: npm run openfin:build
- name: Deploy (OpenFin)
run: |
gsutil -m \
-h "Cache-Control: no-cache" \
rsync -d -r dist \
gs://$BUCKET_OPENFIN/tag/${{ steps.vars.outputs.TAG }}
- name: Deploy (Launcher)
run: |
gsutil -m \
-h "Cache-Control: no-cache" \
rsync -d -r dist \
gs://$BUCKET_LAUNCHER/tag/${{ steps.vars.outputs.TAG }}
- name: Build (OpenFin - Workspace)
env:
DOMAIN: https://openfin.prod.reactivetrader.com
URL_PATH: /workspace
VITE_BUILD_VERSION: ${{ steps.vars.outputs.TAG }}
run: |
npm ci
npm run build
working-directory: .
- name: Deploy (OpenFin - Workspace)
run: |
gsutil -m \
-h "Cache-Control: no-cache" \
rsync -d -r dist \
gs://$BUCKET_OPENFIN/tag/${{ steps.vars.outputs.TAG }}/workspace
working-directory: .
- name: Build (Finsemble)
env:
DOMAIN: https://finsemble.prod.reactivetrader.com
VITE_BUILD_VERSION: ${{ steps.vars.outputs.TAG }}
run: npm run finsemble:build
- name: Deploy (Finsemble)
run: |
gsutil -m \
-h "Cache-Control: no-cache" \
rsync -d -r dist \
gs://$BUCKET_FINSEMBLE/tag/${{ steps.vars.outputs.TAG }}