-
Notifications
You must be signed in to change notification settings - Fork 106
157 lines (135 loc) · 5.04 KB
/
cd.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
name: CD
on:
push:
tags:
- v*
permissions:
contents: write
env:
node-version: 20.11.1
jobs:
desktop-build:
name: desktop-build
strategy:
matrix:
include:
- os: ubuntu-latest
command: publish:intel
- os: ubuntu-latest
command: publish:arm
- os: windows-latest
command: publish:intel
- os: macos-13
command: publish:intel
- os: macos-13
command: publish:arm
- os: macos-13
command: publish:universal
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 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: electron*
steps:
- name: Checkout to git repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.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 distributive
uses: borales/actions-yarn@v5
with:
cmd: ${{ matrix.command }}
dir: 'apps/desktop'
- name: Clean-up credentials
if: always() && runner.os == 'macOS'
run: |
rm ${{ github.workspace }}/AuthKey.p8
web-build:
uses: ./.github/workflows/web-build.yaml
with:
environment: 'main'
secrets: inherit
swap-widget-build:
uses: ./.github/workflows/swap-widget-build.yaml
with:
environment: 'main'
secrets: inherit
web-tests:
needs: web-build
uses: ./.github/workflows/web-tests.yaml
with:
base-url: 'https://wallet.tonkeeper.com'
transaction: true
secrets: inherit
extension-build:
name: extension-build
runs-on: macos-14
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: ${{ env.node-version }}
- 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:
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE_EXTENSION }}
REACT_APP_APTABASE: ${{ secrets.VITE_APP_APTABASE }}
REACT_APP_APTABASE_HOST: https://anonymous-analytics.tonkeeper.com
with:
cmd: build:extension
- name: Upload Tonkeeper Extension to release
uses: softprops/action-gh-release@v2
with:
name: 'Tonkeeper ${{ github.ref_name }}'
draft: true
generate_release_notes: true
files: |
${{ github.workspace }}/apps/extension/dist/tonkeeper_chrome_${{
github.ref_name }}.zip
${{ github.workspace
}}/apps/extension/dist/tonkeeper_firefox_${{ github.ref_name }}.zip