-
Notifications
You must be signed in to change notification settings - Fork 113
168 lines (144 loc) · 5.84 KB
/
pull-request.yaml
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Tonkeeper Desktop Distributives
on:
workflow_dispatch:
pull_request:
jobs:
desktop-build:
name: desktop-build
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
node-version: [20.7.0]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
REACT_APP_TG_BOT_ID: ${{ secrets.REACT_APP_TG_BOT_ID }}
REACT_APP_TONCONSOLE_API: https://pro.tonconsole.com
REACT_APP_TG_BOT_ORIGIN: https://tonkeeper.com
REACT_APP_APTABASE: ${{ secrets.VITE_APP_APTABASE }}
REACT_APP_APTABASE_HOST: https://anonymous-analytics.tonkeeper.com
REACT_APP_STONFI_REFERRAL_ADDRESS: ${{ secrets.REACT_APP_STONFI_REFERRAL_ADDRESS }}
DEBUG: electron*
steps:
- name: Checkout to git repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Enable Corepack
run: |
corepack enable
- name: Decode service account into a file
if: runner.os == 'macOS'
env:
CREDENTIALS: ${{ secrets.APPLE_API_KEY }}
run: |
echo $CREDENTIALS | base64 -d > ${{ github.workspace }}/AuthKey.p8
- name: Configure keychain
if: runner.os == 'macOS'
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.IDENTITY_P12_B64 }}
p12-password: ${{ secrets.IDENTITY_PASSPHRASE }}
- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install
- name: Run build packages
uses: borales/actions-yarn@v5
with:
cmd: build:pkg
- name: Run build intel distributive
uses: borales/actions-yarn@v5
with:
cmd: make:intel
dir: 'apps/desktop'
- name: Run build arm distributive
if: runner.os != 'Windows'
uses: borales/actions-yarn@v5
with:
cmd: make:arm
dir: 'apps/desktop'
- name: Run build universal distributive
if: runner.os == 'macOS'
uses: borales/actions-yarn@v5
with:
cmd: make:universal
dir: 'apps/desktop'
- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: Tonkeeper Desktop ${{ runner.os }}
retention-days: 10
path: |
${{ github.workspace }}/apps/desktop/out/make
- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: Tonkeeper Desktop ${{ runner.os }} x64
retention-days: 10
path: |
${{ github.workspace }}/apps/desktop/out/make/squirrel.windows/x64/*Setup.exe
- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: Tonkeeper Desktop ${{ runner.os }} x64
retention-days: 10
path: |
${{ github.workspace }}/apps/desktop/out/make/deb/x64
- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: Tonkeeper Desktop ${{ runner.os }} arm64
retention-days: 10
path: |
${{ github.workspace }}/apps/desktop/out/make/deb/arm64
- name: Clean-up credentials
if: always() && runner.os == 'macOS'
run: |
rm ${{ github.workspace }}/AuthKey.p8
web-build:
name: web-build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout to git repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.7.0
- name: Enable Corepack
run: |
corepack enable
- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install
- name: Run build
uses: borales/actions-yarn@v5
env:
VITE_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE_EXTENSION }}
VITE_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
VITE_APP_APTABASE: ${{ secrets.VITE_APP_APTABASE }}
VITE_APP_APTABASE_HOST: https://anonymous-analytics.tonkeeper.com
VITE_APP_LOCALES: en,zh_CN,ru,it,tr
with:
cmd: build:web
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: tonkeeper-web
directory: apps/web/dist
wranglerVersion: '3'