-
Notifications
You must be signed in to change notification settings - Fork 63
165 lines (152 loc) · 9.39 KB
/
manual-builds.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
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
name: Manual builds
run-name: Manual build of ${{ github.ref_name }} (Chrome=${{ github.event.inputs.chrome == 'true' || github.event.inputs.chromePlusE2E == 'true' }}; Firefox=${{ github.event.inputs.firefox == 'true' }}; E2E=${{ github.event.inputs.chromePlusE2E == 'true' }}; Core=${{ github.event.inputs.core == 'true' }} ; Prod=${{ github.event.inputs.prod == 'true' }})
on:
workflow_dispatch:
inputs:
core:
type: boolean
description: Build without private packages
required: false
prod:
type: boolean
description: Build for production environment
required: false
chrome:
type: boolean
description: Chrome build
required: false
chromePlusE2E:
type: boolean
description: Chrome build + E2E
required: false
firefox:
type: boolean
description: Firefox build
required: false
jobs:
additional-builds:
name: Creates builds for a specific browsers
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.prod == 'true' && 'production' || 'development' }}
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Repo setup
uses: ./.github/workflows/repo-setup
- name: Secrets setup
uses: ./.github/workflows/secrets-setup
with:
GITHUB_ACTION_RUN_ENV: ${{ github.event.inputs.prod == 'true' && 'production' || 'development' }}
NPM_TOKEN: ${{ github.event.inputs.core && '' || secrets.NPM_TOKEN }}
TEMPLE_WALLET_JITSU_TRACKING_HOST: ${{ vars.TEMPLE_WALLET_JITSU_TRACKING_HOST }}
TEMPLE_WALLET_JITSU_WRITE_KEY: ${{ vars.TEMPLE_WALLET_JITSU_WRITE_KEY }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_DEXES_API_URL: ${{ vars.TEMPLE_WALLET_DEXES_API_URL }}
TEMPLE_ADS_API_URL: ${{ vars.TEMPLE_ADS_API_URL }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN: ${{ vars.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_MOONPAY_API_KEY: ${{ secrets.TEMPLE_WALLET_MOONPAY_API_KEY }}
TEMPLE_FIREBASE_CONFIG: ${{ secrets.TEMPLE_FIREBASE_CONFIG }}
TEMPLE_FIREBASE_MESSAGING_VAPID_KEY: ${{ secrets.TEMPLE_FIREBASE_MESSAGING_VAPID_KEY }}
HYPELAB_API_URL: ${{ vars.HYPELAB_API_URL }}
HYPELAB_MISES_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_SMALL_PLACEMENT_SLUG }}
HYPELAB_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_MISES_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_HIGH_PLACEMENT_SLUG }}
HYPELAB_HIGH_PLACEMENT_SLUG: ${{ vars.HYPELAB_HIGH_PLACEMENT_SLUG }}
HYPELAB_MISES_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_WIDE_PLACEMENT_SLUG }}
HYPELAB_WIDE_PLACEMENT_SLUG: ${{ vars.HYPELAB_WIDE_PLACEMENT_SLUG }}
HYPELAB_MISES_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_MISES_NATIVE_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_NATIVE_PLACEMENT_SLUG }}
HYPELAB_PROPERTY_SLUG: ${{ vars.HYPELAB_PROPERTY_SLUG }}
HYPELAB_ADS_WINDOW_URL: ${{ vars.HYPELAB_ADS_WINDOW_URL }}
PERSONA_ADS_API_KEY: ${{ vars.PERSONA_ADS_API_KEY }}
PERSONA_ADS_MISES_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_BANNER_UNIT_ID }}
PERSONA_ADS_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_WIDE_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_WIDE_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MISES_SQUARISH_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
SMARTY_300_250_PLACEMENT_ID: ${{ vars.SMARTY_300_250_PLACEMENT_ID }}
SMARTY_320_50_PLACEMENT_ID: ${{ vars.SMARTY_320_50_PLACEMENT_ID }}
SMARTY_728_90_PLACEMENT_ID: ${{ vars.SMARTY_728_90_PLACEMENT_ID }}
SMARTY_970_90_PLACEMENT_ID: ${{ vars.SMARTY_970_90_PLACEMENT_ID }}
SMARTY_336_280_PLACEMENT_ID: ${{ vars.SMARTY_336_280_PLACEMENT_ID }}
SMARTY_160_600_PLACEMENT_ID: ${{ vars.SMARTY_160_600_PLACEMENT_ID }}
SMARTY_970_250_PLACEMENT_ID: ${{ vars.SMARTY_970_250_PLACEMENT_ID }}
SMARTY_320_100_PLACEMENT_ID: ${{ vars.SMARTY_320_100_PLACEMENT_ID }}
SMARTY_300_600_PLACEMENT_ID: ${{ vars.SMARTY_300_600_PLACEMENT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
TAKE_ADS_TOKEN: ${{ secrets.TAKE_ADS_TOKEN }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}
# [e2e]
DEFAULT_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.DEFAULT_HD_ACCOUNT_SEED_PHRASE }}
DEFAULT_HD_ACCOUNT_FIRST_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
DEFAULT_HD_ACCOUNT_FIRST_PUBLIC_KEY_HASH: ${{ secrets.DEFAULT_HD_ACCOUNT_FIRST_PUBLIC_KEY_HASH }}
DEFAULT_HD_ACCOUNT_FIRST_HASH_SHORT_FORM: ${{ secrets.DEFAULT_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
DEFAULT_HD_ACCOUNT_SECOND_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_SECOND_PRIVATE_KEY }}
DEFAULT_HD_ACCOUNT_SECOND_PUBLIC_KEY_HASH: ${{ secrets.DEFAULT_HD_ACCOUNT_SECOND_PUBLIC_KEY_HASH }}
DEFAULT_HD_ACCOUNT_SECOND_HASH_SHORT_FORM: ${{ secrets.DEFAULT_HD_ACCOUNT_SECOND_HASH_SHORT_FORM }}
DEFAULT_PASSWORD: ${{ secrets.DEFAULT_PASSWORD }}
IMPORTED_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.IMPORTED_HD_ACCOUNT_SEED_PHRASE }}
IMPORTED_HD_ACCOUNT_FIRST_PRIVATE_KEY: ${{ secrets.IMPORTED_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
IMPORTED_HD_ACCOUNT_FIRST_PUBLIC_KEY_HASH: ${{ secrets.IMPORTED_HD_ACCOUNT_FIRST_PUBLIC_KEY_HASH }}
IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM: ${{ secrets.IMPORTED_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
WATCH_ONLY_PUBLIC_KEY_HASH: ${{ secrets.WATCH_ONLY_PUBLIC_KEY_HASH }}
WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM: ${{ secrets.WATCH_ONLY_PUBLIC_KEY_HASH_SHORT_FORM }}
LONG_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.LONG_HD_ACCOUNT_SEED_PHRASE }}
LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY: ${{ secrets.LONG_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY: ${{ secrets.LONG_HD_ACCOUNT_FIRST_PUBLIC_KEY }}
LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM: ${{ secrets.LONG_HD_ACCOUNT_FIRST_HASH_SHORT_FORM }}
CUSTOM_NETWORK_RPC_URL: ${{ secrets.CUSTOM_NETWORK_RPC_URL }}
CUSTOM_NETWORK_SECOND_RPC_URL: ${{ secrets.CUSTOM_NETWORK_SECOND_RPC_URL }}
NOTIFICATION_AUTHORIZATION: ${{ secrets.NOTIFICATION_AUTHORIZATION }}
- name: Install dependencies and code quality
uses: ./.github/workflows/code-quality-check
with:
optional_modules: ${{ github.event.inputs.core != 'true' }}
- name: Create Chrome build
if: ${{ (github.event.inputs.chrome == 'true' || github.event.inputs.chromePlusE2E == 'true') && github.event.inputs.core != 'true' }}
run: yarn build:chrome
- name: Create core Chrome build
if: ${{ (github.event.inputs.chrome == 'true' || github.event.inputs.chromePlusE2E == 'true') && github.event.inputs.core == 'true' }}
run: yarn build:chrome:core
- name: Upload Chrome artifact
if: ${{ github.event.inputs.chrome == 'true' || github.event.inputs.chromePlusE2E == 'true' }}
uses: actions/upload-artifact@v4
with:
name: chrome
path: dist/chrome.zip
if-no-files-found: error
retention-days: 30
- name: Perform end-to-end tests
if: ${{ github.event.inputs.chromePlusE2E == 'true' }}
uses: ./.github/workflows/e2e
with:
optional_modules: ${{ github.event.inputs.core != 'true' }}
- name: Upload E2E video to Slack
if: ${{ failure() && github.event.inputs.chromePlusE2E == 'true' }}
uses: adrey/slack-file-upload-action@master
with:
token: ${{ secrets.SLACK_E2E_VIDEO_UPLOADER_TOKEN }}
path: e2e/video-rep/test-runs.mp4
channel: temple-test-runs
initial_comment: <https://github.com/madfish-solutions/templewallet-extension/pull/${{ github.event.number }}|${{ github.event.pull_request.title }}> (Run <https://github.com/madfish-solutions/templewallet-extension/actions/runs/${{ github.run_id }}|№${{ github.run_number }}>)
- name: Create Firefox build
if: ${{ github.event.inputs.firefox == 'true' && github.event.inputs.core != 'true'}}
run: yarn build:firefox
- name: Create core Firefox build
if: ${{ github.event.inputs.firefox == 'true' && github.event.inputs.core == 'true'}}
run: yarn build:firefox:core
- name: Upload Firefox artifact
if: ${{ github.event.inputs.firefox == 'true' }}
uses: actions/upload-artifact@v4
with:
name: firefox
path: dist/firefox.xpi
if-no-files-found: error
retention-days: 30