1+ name : Build All Platforms
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main ]
8+ release :
9+ types : [ published ]
10+
11+ jobs :
12+ build-web :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version-file : ' .nvmrc'
22+ cache : ' yarn'
23+
24+ - name : Install dependencies
25+ run : yarn install --frozen-lockfile
26+
27+ - name : Build web application
28+ run : ./scripts/build-web.sh
29+
30+ - name : Upload web artifacts
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : web-build
34+ path : deploy_*/
35+ retention-days : 30
36+
37+ build-extensions :
38+ runs-on : ubuntu-latest
39+ needs : build-web
40+ steps :
41+ - name : Checkout code
42+ uses : actions/checkout@v4
43+
44+ - name : Setup Node.js
45+ uses : actions/setup-node@v4
46+ with :
47+ node-version-file : ' .nvmrc'
48+ cache : ' yarn'
49+
50+ - name : Install dependencies
51+ run : yarn install --frozen-lockfile
52+
53+ - name : Build browser extensions
54+ run : ./scripts/build-extensions.sh
55+
56+ - name : Upload extension artifacts
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : browser-extensions
60+ path : |
61+ extension/*.zip
62+ extension/extension-build-info.txt
63+ retention-days : 30
64+
65+ build-android :
66+ runs-on : ubuntu-latest
67+ needs : build-web
68+ steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v4
71+
72+ - name : Setup Node.js
73+ uses : actions/setup-node@v4
74+ with :
75+ node-version-file : ' .nvmrc'
76+ cache : ' yarn'
77+
78+ - name : Setup Java
79+ uses : actions/setup-java@v4
80+ with :
81+ distribution : ' temurin'
82+ java-version : ' 17'
83+
84+ - name : Install dependencies
85+ run : yarn install --frozen-lockfile
86+
87+ - name : Build mobile applications
88+ run : ./scripts/build-mobile.sh
89+
90+ - name : Upload Android artifacts
91+ uses : actions/upload-artifact@v4
92+ with :
93+ name : android-builds
94+ path : |
95+ android/app/build/outputs/apk/**/*.apk
96+ android/app/build/outputs/bundle/**/*.aab
97+ retention-days : 30
98+
99+ build-all-platforms :
100+ runs-on : ubuntu-latest
101+ if : github.event_name == 'release'
102+ steps :
103+ - name : Checkout code
104+ uses : actions/checkout@v4
105+
106+ - name : Setup Node.js
107+ uses : actions/setup-node@v4
108+ with :
109+ node-version-file : ' .nvmrc'
110+ cache : ' yarn'
111+
112+ - name : Setup Java
113+ uses : actions/setup-java@v4
114+ with :
115+ distribution : ' temurin'
116+ java-version : ' 17'
117+
118+ - name : Install dependencies
119+ run : yarn install --frozen-lockfile
120+
121+ - name : Build all platforms
122+ run : ./scripts/build-all-platforms.sh
123+
124+ - name : Upload complete build artifacts
125+ uses : actions/upload-artifact@v4
126+ with :
127+ name : complete-build-${{ github.sha }}
128+ path : |
129+ artifacts_*/
130+ svmseek-wallet-*.tar.gz
131+ retention-days : 90
132+
133+ - name : Upload to release
134+ if : github.event_name == 'release'
135+ uses : actions/upload-release-asset@v1
136+ env :
137+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
138+ with :
139+ upload_url : ${{ github.event.release.upload_url }}
140+ asset_path : ./svmseek-wallet-*.tar.gz
141+ asset_name : svmseek-wallet-all-platforms.tar.gz
142+ asset_content_type : application/gzip
143+
144+ test :
145+ runs-on : ubuntu-latest
146+ steps :
147+ - name : Checkout code
148+ uses : actions/checkout@v4
149+
150+ - name : Setup Node.js
151+ uses : actions/setup-node@v4
152+ with :
153+ node-version-file : ' .nvmrc'
154+ cache : ' yarn'
155+
156+ - name : Install dependencies
157+ run : yarn install --frozen-lockfile
158+
159+ - name : Run tests
160+ run : yarn test --watchAll=false --coverage
161+
162+ - name : Install Playwright
163+ run : yarn playwright:install
164+
165+ - name : Run E2E tests
166+ run : yarn test:e2e
167+
168+ - name : Upload test results
169+ uses : actions/upload-artifact@v4
170+ if : always()
171+ with :
172+ name : test-results
173+ path : |
174+ coverage/
175+ playwright-report/
176+ retention-days : 7
0 commit comments