Skip to content

Commit 50dda59

Browse files
authored
Merge pull request #981 from cowprotocol/release/1.21
Release/1.21
2 parents d619f0f + 05204eb commit 50dda59

File tree

652 files changed

+18560
-28159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

652 files changed

+18560
-28159
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
12+
[{*.ts,*.tsx}]
13+
ij_typescript_force_quote_style = true
14+
ij_typescript_use_double_quotes = false
15+
ij_typescript_use_semicolon_after_statement = false

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ REACT_APP_PINATA_SECRET_API_KEY=
8282

8383
# Appzi NPS feedback
8484
REACT_APP_FEEDBACK_ENABLED_DEV=false
85+
#REACT_APP_APPZI_FEEDBACK_KEY=
86+
#REACT_APP_APPZI_NPS_KEY=

.env.production

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,6 @@ REACT_APP_LOCALES="locales"
8282
#REACT_APP_PINATA_SECRET_API_KEY=
8383

8484
# Appzi NPS feedback
85-
#REACT_APP_FEEDBACK_ENABLED_DEV=false
85+
#REACT_APP_FEEDBACK_ENABLED_DEV=false
86+
#REACT_APP_APPZI_FEEDBACK_KEY=
87+
#REACT_APP_APPZI_NPS_KEY=

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"ignorePatterns": [
1717
"src/lib/",
18-
"__fixtures__",
1918
".github/*",
2019
"src/components/RateToggle/index.tsx",
2120
"src/types/v3",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup
2+
runs:
3+
using: composite
4+
steps:
5+
- uses: actions/checkout@v3
6+
7+
- uses: actions/setup-node@v3
8+
with:
9+
node-version: 14
10+
registry-url: https://registry.npmjs.org
11+
cache: yarn
12+
13+
- uses: actions/cache@v3
14+
id: install-cache
15+
with:
16+
path: node_modules/
17+
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}
18+
19+
- if: steps.install-cache.outputs.cache-hit != 'true'
20+
run: yarn install --frozen-lockfile --ignore-scripts
21+
shell: bash

.github/uniswap-original/workflows/check-pr-title.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Check PR Title"
1+
name: Check PR Title
22

33
on:
44
pull_request_target:
@@ -8,8 +8,8 @@ on:
88
- synchronize
99

1010
jobs:
11-
check-pr-title:
12-
name: Check PR Title
11+
# Ensures that the PR title adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
12+
conventional-commit:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: amannn/[email protected]
Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,33 @@
11
name: Crowdin Download
22

3-
# hourly we sync translations from Crowdin
43
on:
54
schedule:
6-
- cron: '0 * * * *' # every hour we download translations and update the pr from crowdin
7-
5+
# Download translations every hour.
6+
# This is not done as part of the build so that builds remain reproducible.
7+
- cron: '0 * * * *'
88
# manual trigger
99
workflow_dispatch:
1010

1111
jobs:
1212
download-translations:
13-
name: Download translations
1413
runs-on: ubuntu-latest
15-
1614
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v2
19-
20-
- name: Set up node
21-
uses: actions/setup-node@v2
22-
with:
23-
node-version: 14
24-
registry-url: https://registry.npmjs.org
25-
26-
- name: Get yarn cache directory path
27-
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
30-
- uses: actions/cache@v2
31-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-
37-
38-
- name: Install dependencies
39-
run: yarn install --frozen-lockfile
40-
41-
- name: Extract translations
42-
run: "yarn i18n:extract"
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/setup
17+
- run: yarn i18n:extract
4318

44-
- name: Synchronize
45-
uses: crowdin/github-action@1.1.0
19+
- name: Download Crowdin translations
20+
uses: crowdin/github-action@1.4.9
4621
with:
4722
upload_sources: false
4823
download_translations: true
4924
project_id: 458284
5025
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
5126
source: 'src/locales/en-US.po'
5227
translation: 'src/locales/%locale%.po'
53-
create_pull_request: false
54-
localization_branch_name: main
55-
commit_message: "chore(i18n): synchronize translations from crowdin [skip ci]"
28+
create_pull_request: true
29+
pull_request_title: 'chore(i18n): new Crowdin translations'
30+
localization_branch_name: l10n_crowdin
31+
commit_message: 'chore(i18n): synchronize translations from crowdin [skip ci]'
5632
env:
5733
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/uniswap-original/workflows/crowdin.yaml

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,19 @@
11
name: Crowdin Upload
22

3-
# on any push to main, we upload the translations to be translated
43
on:
54
push:
65
branches:
76
- main
87

98
jobs:
10-
synchronize-with-crowdin:
11-
name: Upload sources to Crowdin
9+
upload-sources:
1210
runs-on: ubuntu-latest
13-
1411
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
18-
- name: Set up node
19-
uses: actions/setup-node@v2
20-
with:
21-
node-version: 14
22-
registry-url: https://registry.npmjs.org
23-
24-
- name: Get yarn cache directory path
25-
id: yarn-cache-dir-path
26-
run: echo "::set-output name=dir::$(yarn cache dir)"
27-
28-
- uses: actions/cache@v2
29-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
30-
with:
31-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
33-
restore-keys: |
34-
${{ runner.os }}-yarn-
35-
36-
- name: Install dependencies
37-
run: yarn install --frozen-lockfile
38-
39-
- name: Extract translations
40-
run: "yarn i18n:extract"
12+
- uses: actions/checkout@v3
13+
- uses: ./.github/actions/setup
14+
- run: yarn i18n:extract
4115

42-
- name: Synchronize
16+
- name: Upload Crowdin sources
4317
uses: crowdin/[email protected]
4418
with:
4519
upload_sources: true
Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
11
name: Release
22
on:
33
schedule:
4-
- cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday
5-
4+
- cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday
65
# manual trigger
76
workflow_dispatch:
87

98
jobs:
10-
bump_version:
11-
name: Bump Version
9+
wait-on-tests:
1210
runs-on: ubuntu-latest
13-
outputs:
14-
new_tag: ${{ steps.github_tag_action.outputs.new_tag }}
15-
changelog: ${{ steps.github_tag_action.outputs.changelog }}
1611
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v2
12+
- id: unit-tests
13+
uses: fountainhead/[email protected]
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
checkName: unit-tests
17+
- id: cypress-tests
18+
uses: fountainhead/[email protected]
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
checkName: cypress-tests
22+
- if: steps.unit-tests.outputs.conclusion != 'success' || steps.cypress-tests.outputs.conclusion != 'success'
23+
run: exit 1
1924

20-
- name: Bump version and push tag
21-
id: github_tag_action
22-
uses: mathieudutour/github-tag-action@331898d5052eedac9b15fec867b5ba66ebf9b692
25+
tag:
26+
needs: wait-on-tests
27+
runs-on: ubuntu-latest
28+
outputs:
29+
new_tag: ${{ steps.github-tag-action.outputs.new_tag }}
30+
changelog: ${{ steps.github-tag-action.outputs.changelog }}
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Bump and tag
34+
id: github-tag-action
35+
uses: mathieudutour/[email protected]
2336
with:
2437
github_token: ${{ secrets.GITHUB_TOKEN }}
2538
release_branches: .*
26-
default_bump: false
39+
default_bump: patch
2740

28-
create_release:
29-
name: Create Release
41+
release:
42+
needs: tag
43+
if: ${{ needs.tag.outputs.new_tag != null }}
3044
runs-on: ubuntu-latest
31-
needs: bump_version
32-
if: ${{ needs.bump_version.outputs.new_tag != null }}
3345
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v2
36-
37-
- name: Set up node
38-
uses: actions/setup-node@v2
39-
with:
40-
node-version: 14
41-
registry-url: https://registry.npmjs.org
42-
43-
- name: Install dependencies
44-
run: yarn install --frozen-lockfile
45-
46-
- name: Build the IPFS bundle
47-
run: yarn build
46+
- uses: actions/checkout@v3
47+
- uses: ./.github/actions/setup
48+
- run: yarn prepare
49+
- run: yarn build
4850

4951
- name: Pin to IPFS
50-
id: upload
52+
id: pinata
5153
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
5254
with:
53-
pin-name: Uniswap ${{ needs.bump_version.outputs.new_tag }}
55+
pin-name: Uniswap ${{ needs.tag.outputs.new_tag }}
5456
path: './build'
5557
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
5658
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
@@ -64,10 +66,24 @@ jobs:
6466
seeds: ${{ secrets.CRUST_SEEDS }}
6567

6668
- name: Convert CIDv0 to CIDv1
67-
id: convert_cidv0
69+
id: convert-cidv0
6870
uses: uniswap/[email protected]
6971
with:
70-
cidv0: ${{ steps.upload.outputs.hash }}
72+
cidv0: ${{ steps.pinata.outputs.hash }}
73+
74+
- uses: actions/cache@v3
75+
id: cypress-cache
76+
with:
77+
path: /home/runner/.cache/Cypress
78+
key: ${{ runner.os }}-cypress-${{ hashFiles('node_modules/cypress') }}
79+
- if: steps.cypress-cache.outputs.cache-hit != 'true'
80+
run: yarn cypress install
81+
- uses: cypress-io/github-action@v4
82+
with:
83+
install: false
84+
browser: chrome
85+
config-file: cypress.release.config.ts
86+
config: baseUrl=https://cloudflare-ipfs.com/ipfs/${{ steps.pinata.outputs.hash }}
7187

7288
- name: Update DNS with new IPFS hash
7389
env:
@@ -77,20 +93,19 @@ jobs:
7793
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
7894
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
7995
with:
80-
cid: ${{ steps.upload.outputs.hash }}
96+
cid: ${{ steps.pinata.outputs.hash }}
8197

82-
- name: Create GitHub Release
83-
id: create_release
98+
- name: Release
8499
uses: actions/[email protected]
85100
env:
86101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87102
with:
88-
tag_name: ${{ needs.bump_version.outputs.new_tag }}
89-
release_name: Release ${{ needs.bump_version.outputs.new_tag }}
103+
tag_name: ${{ needs.tag.outputs.new_tag }}
104+
release_name: Release ${{ needs.tag.outputs.new_tag }}
90105
body: |
91106
IPFS hash of the deployment:
92-
- CIDv0: `${{ steps.upload.outputs.hash }}`
93-
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}`
107+
- CIDv0: `${{ steps.pinata.outputs.hash }}`
108+
- CIDv1: `${{ steps.convert-cidv0.outputs.cidv1 }}`
94109
95110
The latest release is always accessible via our alias to the Cloudflare IPFS gateway at [app.uniswap.org](https://app.uniswap.org).
96111
@@ -100,8 +115,8 @@ jobs:
100115
Your Uniswap settings are never remembered across different URLs.
101116
102117
IPFS gateways:
103-
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
104-
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
105-
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/)
118+
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.dweb.link/
119+
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
120+
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/)
106121
107-
${{ needs.bump_version.outputs.changelog }}
122+
${{ needs.tag.outputs.changelog }}

0 commit comments

Comments
 (0)