-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #981 from cowprotocol/release/1.21
Release/1.21
- Loading branch information
Showing
652 changed files
with
18,560 additions
and
28,159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
|
||
[{*.ts,*.tsx}] | ||
ij_typescript_force_quote_style = true | ||
ij_typescript_use_double_quotes = false | ||
ij_typescript_use_semicolon_after_statement = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Setup | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
cache: yarn | ||
|
||
- uses: actions/cache@v3 | ||
id: install-cache | ||
with: | ||
path: node_modules/ | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- if: steps.install-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile --ignore-scripts | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Check PR Title" | ||
name: Check PR Title | ||
|
||
on: | ||
pull_request_target: | ||
|
@@ -8,8 +8,8 @@ on: | |
- synchronize | ||
|
||
jobs: | ||
check-pr-title: | ||
name: Check PR Title | ||
# Ensures that the PR title adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
conventional-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,33 @@ | ||
name: Crowdin Download | ||
|
||
# hourly we sync translations from Crowdin | ||
on: | ||
schedule: | ||
- cron: '0 * * * *' # every hour we download translations and update the pr from crowdin | ||
|
||
# Download translations every hour. | ||
# This is not done as part of the build so that builds remain reproducible. | ||
- cron: '0 * * * *' | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
download-translations: | ||
name: Download translations | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Extract translations | ||
run: "yarn i18n:extract" | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: yarn i18n:extract | ||
|
||
- name: Synchronize | ||
uses: crowdin/github-action@1.1.0 | ||
- name: Download Crowdin translations | ||
uses: crowdin/github-action@1.4.9 | ||
with: | ||
upload_sources: false | ||
download_translations: true | ||
project_id: 458284 | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }} | ||
source: 'src/locales/en-US.po' | ||
translation: 'src/locales/%locale%.po' | ||
create_pull_request: false | ||
localization_branch_name: main | ||
commit_message: "chore(i18n): synchronize translations from crowdin [skip ci]" | ||
create_pull_request: true | ||
pull_request_title: 'chore(i18n): new Crowdin translations' | ||
localization_branch_name: l10n_crowdin | ||
commit_message: 'chore(i18n): synchronize translations from crowdin [skip ci]' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,19 @@ | ||
name: Crowdin Upload | ||
|
||
# on any push to main, we upload the translations to be translated | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
synchronize-with-crowdin: | ||
name: Upload sources to Crowdin | ||
upload-sources: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Extract translations | ||
run: "yarn i18n:extract" | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: yarn i18n:extract | ||
|
||
- name: Synchronize | ||
- name: Upload Crowdin sources | ||
uses: crowdin/[email protected] | ||
with: | ||
upload_sources: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,58 @@ | ||
name: Release | ||
on: | ||
schedule: | ||
- cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday | ||
|
||
- cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump_version: | ||
name: Bump Version | ||
wait-on-tests: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_tag: ${{ steps.github_tag_action.outputs.new_tag }} | ||
changelog: ${{ steps.github_tag_action.outputs.changelog }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- id: unit-tests | ||
uses: fountainhead/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: unit-tests | ||
- id: cypress-tests | ||
uses: fountainhead/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: cypress-tests | ||
- if: steps.unit-tests.outputs.conclusion != 'success' || steps.cypress-tests.outputs.conclusion != 'success' | ||
run: exit 1 | ||
|
||
- name: Bump version and push tag | ||
id: github_tag_action | ||
uses: mathieudutour/github-tag-action@331898d5052eedac9b15fec867b5ba66ebf9b692 | ||
tag: | ||
needs: wait-on-tests | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_tag: ${{ steps.github-tag-action.outputs.new_tag }} | ||
changelog: ${{ steps.github-tag-action.outputs.changelog }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Bump and tag | ||
id: github-tag-action | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_branches: .* | ||
default_bump: false | ||
default_bump: patch | ||
|
||
create_release: | ||
name: Create Release | ||
release: | ||
needs: tag | ||
if: ${{ needs.tag.outputs.new_tag != null }} | ||
runs-on: ubuntu-latest | ||
needs: bump_version | ||
if: ${{ needs.bump_version.outputs.new_tag != null }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build the IPFS bundle | ||
run: yarn build | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: yarn prepare | ||
- run: yarn build | ||
|
||
- name: Pin to IPFS | ||
id: upload | ||
id: pinata | ||
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d | ||
with: | ||
pin-name: Uniswap ${{ needs.bump_version.outputs.new_tag }} | ||
pin-name: Uniswap ${{ needs.tag.outputs.new_tag }} | ||
path: './build' | ||
pinata-api-key: ${{ secrets.PINATA_API_KEY }} | ||
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }} | ||
|
@@ -64,10 +66,24 @@ jobs: | |
seeds: ${{ secrets.CRUST_SEEDS }} | ||
|
||
- name: Convert CIDv0 to CIDv1 | ||
id: convert_cidv0 | ||
id: convert-cidv0 | ||
uses: uniswap/[email protected] | ||
with: | ||
cidv0: ${{ steps.upload.outputs.hash }} | ||
cidv0: ${{ steps.pinata.outputs.hash }} | ||
|
||
- uses: actions/cache@v3 | ||
id: cypress-cache | ||
with: | ||
path: /home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-cypress-${{ hashFiles('node_modules/cypress') }} | ||
- if: steps.cypress-cache.outputs.cache-hit != 'true' | ||
run: yarn cypress install | ||
- uses: cypress-io/github-action@v4 | ||
with: | ||
install: false | ||
browser: chrome | ||
config-file: cypress.release.config.ts | ||
config: baseUrl=https://cloudflare-ipfs.com/ipfs/${{ steps.pinata.outputs.hash }} | ||
|
||
- name: Update DNS with new IPFS hash | ||
env: | ||
|
@@ -77,20 +93,19 @@ jobs: | |
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848 | ||
with: | ||
cid: ${{ steps.upload.outputs.hash }} | ||
cid: ${{ steps.pinata.outputs.hash }} | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
- name: Release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.bump_version.outputs.new_tag }} | ||
release_name: Release ${{ needs.bump_version.outputs.new_tag }} | ||
tag_name: ${{ needs.tag.outputs.new_tag }} | ||
release_name: Release ${{ needs.tag.outputs.new_tag }} | ||
body: | | ||
IPFS hash of the deployment: | ||
- CIDv0: `${{ steps.upload.outputs.hash }}` | ||
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}` | ||
- CIDv0: `${{ steps.pinata.outputs.hash }}` | ||
- CIDv1: `${{ steps.convert-cidv0.outputs.cidv1 }}` | ||
The latest release is always accessible via our alias to the Cloudflare IPFS gateway at [app.uniswap.org](https://app.uniswap.org). | ||
|
@@ -100,8 +115,8 @@ jobs: | |
Your Uniswap settings are never remembered across different URLs. | ||
IPFS gateways: | ||
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/ | ||
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/ | ||
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/) | ||
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.dweb.link/ | ||
- https://${{ steps.convert-cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/ | ||
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/) | ||
${{ needs.bump_version.outputs.changelog }} | ||
${{ needs.tag.outputs.changelog }} |
Oops, something went wrong.