-
Notifications
You must be signed in to change notification settings - Fork 274
148 lines (128 loc) · 4.63 KB
/
release.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
name: Release
on:
push:
branches:
- release/*
tags:
- "**"
jobs:
build:
environment: "prod"
env:
FEATURE_PRIVACY_SETTINGS: "true"
FEATURE_EXPERIMENTAL_SETTINGS: "false"
FEATURE_BETA_FEATURES: "false"
FEATURE_BANXA: "true"
FEATURE_LAYERSWAP: "true"
FEATURE_ORBITER: "true"
FEATURE_VERIFIED_DAPPS: "true"
ARGENT_SHIELD_NETWORK_ID: "mainnet-alpha"
FEATURE_MULTISIG: "true"
FEATURE_ACTIVITY_V2: "true"
SENTRY_ENVIRONMENT: "production"
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
RAMP_API_KEY: ${{ secrets.RAMP_API_KEY }}
TOPPER_PEM_KEY: ${{ secrets.TOPPER_PEM_KEY }}
FILENAME: argent-extension
SAFE_ENV_VARS: true
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }}
ARGENT_X_ENVIRONMENT: "prod"
MULTICALL_MAX_BATCH_SIZE: 20
# Refresh intervals
REFRESH_INTERVAL_FAST: 20
REFRESH_INTERVAL_MEDIUM: 60
REFRESH_INTERVAL_SLOW: 300
REFRESH_INTERVAL_VERY_SLOW: 86400
NEW_CAIRO_0_ENABLED: false
if: ${{ !startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'extension') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "pnpm"
- run: pnpm run setup
- name: Build Chrome version
run: pnpm build
- name: Check bundlesize for chrome
run: pnpm bundlewatch
- name: Create chrome zip
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-chrome.zip" .)
- name: Build Firefox version
run: MANIFEST_VERSION=v2 pnpm --filter @argent-x/extension build
- name: Create firefox zip
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME }}-firefox.zip" .)
- name: Check bundlesize for firefox
run: pnpm bundlewatch
- name: Upload artifacts for chrome
uses: actions/upload-artifact@v4
with:
name: chrome
path: "*-chrome.zip"
retention-days: 14
if-no-files-found: error
- name: Upload artifacts for firefox
uses: actions/upload-artifact@v4
with:
name: firefox
path: "*-firefox.zip"
retention-days: 14
if-no-files-found: error
- name: Get Extension version
id: package-version
run: |
PACKAGE_VERSION=$(cat ./packages/extension/package.json | jq -r '.version')
echo "current-version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
- name: Check sourcemaps
run: |
ls -l ./packages/extension
if [ ! -d "./packages/extension/sourcemaps" ]; then
echo "No sourcemaps found"
exit 1
fi
- name: Create Sentry release
if: startsWith(github.ref, 'refs/tags/')
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_LOG_LEVEL: debug
with:
environment: ${{ env.SENTRY_ENVIRONMENT }}
sourcemaps: "./packages/extension/dist ./packages/extension/sourcemaps"
url_prefix: "~/"
version: ${{ steps.package-version.outputs.current-version }}
ignore_missing: true
- name: Get product version
id: product-version
run: |
PRODUCT_VERSION=$(cat ./packages/extension/dist/manifest.json | jq -r '.version')
echo "current-version=${PRODUCT_VERSION}" >> $GITHUB_OUTPUT
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
name: extension@${{ steps.product-version.outputs.current-version }}
files: |
${{ env.FILENAME }}-chrome.zip
${{ env.FILENAME }}-firefox.zip