-
Notifications
You must be signed in to change notification settings - Fork 146
96 lines (80 loc) · 2.73 KB
/
build-extension.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
name: PR Extensions builds
on: [pull_request, workflow_dispatch]
env:
COINBASE_APP_ID: ${{ secrets.COINBASE_APP_ID }}
MOONPAY_API_KEY: ${{ secrets.MOONPAY_API_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_STAGING }}
TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }}
WALLET_ENVIRONMENT: feature
jobs:
pre-run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@ad6cb1b847ffb509a69b745b6ee2f1d14dfe14b8
with:
access_token: ${{ github.token }}
update-pull-request-body:
name: Add links to built extensions
# Don't run on forks
if: github.repository == 'hirosystems/wallet' || github.repository == 'hirosystems/wallet-private'
runs-on: ubuntu-latest
needs:
- pre-run
steps:
- uses: kyranjamie/[email protected]
with:
header: '> Try out this version of the Hiro Wallet - download [extension builds](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_chrome_extension:
name: Build debug Chrome extension
runs-on: ubuntu-latest
needs:
- pre-run
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
- uses: ./.github/actions/provision
- name: Build project
run: yarn build
- name: Build extension
run: sh build-ext.sh
- uses: actions/upload-artifact@v3
name: Upload Chrome Extension Zip
with:
name: stacks-wallet-chromium
path: stacks-wallet-chromium.zip
build_firefox:
name: Build debug Firefox extension
runs-on: ubuntu-latest
needs:
- pre-run
env:
MINIFY_PRODUCTION_BUILD: true
TARGET_BROWSER: firefox
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/cache@v3
id: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
- uses: ./.github/actions/provision
- name: Build project
run: yarn build
- name: Build extension
run: sh build-ext.sh
- name: Rename file
run: mv stacks-wallet-chromium.zip stacks-wallet-firefox.zip
- uses: actions/upload-artifact@v3
with:
name: stacks-wallet-firefox
path: stacks-wallet-firefox.zip