2020-05-21 22:38:30 +03:00
name : Release
2020-05-21 06:31:05 +03:00
on :
2022-12-13 20:32:43 +03:00
schedule :
- cron : '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday
2020-07-09 16:57:17 +03:00
# manual trigger
2020-09-24 19:31:18 +03:00
workflow_dispatch :
2020-05-26 18:01:05 +03:00
2020-05-21 06:31:05 +03:00
jobs :
2022-07-11 17:42:52 +03:00
wait-on-tests :
2022-07-07 21:09:47 +03:00
runs-on : ubuntu-latest
steps :
2022-07-11 17:42:52 +03:00
- id : unit-tests
uses : fountainhead/action-wait-for-check@v1.0.0
2022-07-07 21:09:47 +03:00
with :
2022-07-11 17:42:52 +03:00
token : ${{ secrets.GITHUB_TOKEN }}
checkName : unit-tests
- id : cypress-tests
uses : fountainhead/action-wait-for-check@v1.0.0
with :
token : ${{ secrets.GITHUB_TOKEN }}
checkName : cypress-tests
- if : steps.unit-tests.outputs.conclusion != 'success' || steps.cypress-tests.outputs.conclusion != 'success'
run : exit 1
2022-07-02 01:05:37 +03:00
tag :
2022-07-11 17:42:52 +03:00
needs : wait-on-tests
2020-05-21 06:31:05 +03:00
runs-on : ubuntu-latest
2020-05-26 18:01:05 +03:00
outputs :
2022-07-05 18:52:54 +03:00
new_tag : ${{ steps.github-tag-action.outputs.new_tag }}
changelog : ${{ steps.github-tag-action.outputs.changelog }}
2020-05-21 06:31:05 +03:00
steps :
2022-06-17 00:42:18 +03:00
- uses : actions/checkout@v3
2022-07-02 01:05:37 +03:00
- name : Bump and tag
id : github-tag-action
uses : mathieudutour/github-tag-action@v6.0
2020-05-21 06:31:05 +03:00
with :
github_token : ${{ secrets.GITHUB_TOKEN }}
release_branches : .*
2022-07-02 01:05:37 +03:00
default_bump : patch
2020-05-21 21:30:31 +03:00
2022-07-02 01:05:37 +03:00
release :
needs : tag
if : ${{ needs.tag.outputs.new_tag != null }}
2020-05-26 18:01:05 +03:00
runs-on : ubuntu-latest
steps :
2022-06-17 00:42:18 +03:00
- uses : actions/checkout@v3
2022-07-02 01:05:37 +03:00
- uses : ./.github/actions/setup
2022-06-17 00:42:18 +03:00
- run : yarn prepare
- run : yarn build
2020-05-21 21:30:31 +03:00
2020-05-21 21:08:34 +03:00
- name : Pin to IPFS
2022-07-02 01:05:37 +03:00
id : pinata
2020-07-10 22:25:15 +03:00
uses : anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
2020-05-21 06:31:05 +03:00
with :
2022-07-02 01:05:37 +03:00
pin-name : Uniswap ${{ needs.tag.outputs.new_tag }}
2020-05-21 21:08:34 +03:00
path : './build'
pinata-api-key : ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key : ${{ secrets.PINATA_API_SECRET_KEY }}
2020-05-21 21:30:31 +03:00
2021-03-26 18:03:25 +03:00
- name : Pin to Crust
2021-09-07 17:37:07 +03:00
uses : crustio/ipfs-crust-action@v2.0.3
2021-03-26 18:03:25 +03:00
continue-on-error : true
timeout-minutes : 2
with :
cid : ${{ steps.upload.outputs.hash }}
seeds : ${{ secrets.CRUST_SEEDS }}
2020-05-26 20:01:38 +03:00
- name : Convert CIDv0 to CIDv1
2022-07-02 01:05:37 +03:00
id : convert-cidv0
2020-05-26 20:01:38 +03:00
uses : uniswap/convert-cidv0-cidv1@v1.0.0
with :
2022-07-02 01:05:37 +03:00
cidv0 : ${{ steps.pinata.outputs.hash }}
2022-07-14 04:24:58 +03:00
2022-07-02 01:05:37 +03:00
- name : Release
2020-05-21 06:31:05 +03:00
uses : actions/create-release@v1.1.0
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
with :
2022-07-02 01:05:37 +03:00
tag_name : ${{ needs.tag.outputs.new_tag }}
release_name : Release ${{ needs.tag.outputs.new_tag }}
2020-05-21 06:31:05 +03:00
body : |
2020-06-10 20:55:35 +03:00
IPFS hash of the deployment :
2022-07-02 01:05:37 +03:00
- CIDv0 : `${{ steps.pinata.outputs.hash }}`
- CIDv1 : `${{ steps.convert-cidv0.outputs.cidv1 }}`
2020-05-21 06:31:05 +03:00
2020-06-25 03:33:26 +03:00
The latest release is always accessible via our alias to the Cloudflare IPFS gateway at [app.uniswap.org](https://app.uniswap.org).
You can also access the Uniswap Interface directly from an IPFS gateway.
2021-05-13 20:17:34 +03:00
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
**You should always use an IPFS gateway that enforces origin separation**, or our alias to the latest release at [app.uniswap.org](https://app.uniswap.org).
Your Uniswap settings are never remembered across different URLs.
2020-05-23 23:07:23 +03:00
2021-05-13 20:17:34 +03:00
IPFS gateways :
2022-07-02 01:05:37 +03:00
- 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 }}/)
2020-05-23 23:07:23 +03:00
2022-07-02 01:05:37 +03:00
${{ needs.tag.outputs.changelog }}
2022-12-01 00:42:26 +03:00
- name : Setup node@16 (required by Cloudflare Pages)
uses : actions/setup-node@v3
with :
node-version : 16
- name : Update Cloudflare Pages deployment
uses : cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
with :
apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName : ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory : build
githubToken : ${{ secrets.GITHUB_TOKEN }}
2022-12-06 20:34:09 +03:00
- name : Upload source maps to Sentry
2022-12-21 23:39:29 +03:00
uses : getsentry/action-release@bd5f874fcda966ba48139b0140fb3ec0cb3aabdd
continue-on-error : true
2022-12-06 20:34:09 +03:00
env :
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG : ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT : ${{ secrets.SENTRY_PROJECT }}
with :
environment : production
sourcemaps : './build/static/js'
2022-12-22 21:14:03 +03:00
url_prefix : '~/static/js'