2020-05-21 22:38:30 +03:00
|
|
|
name: Release
|
2020-05-21 06:31:05 +03:00
|
|
|
on:
|
2020-05-26 16:16:22 +03:00
|
|
|
# every morning
|
2020-05-21 22:38:30 +03:00
|
|
|
schedule:
|
2020-06-10 20:55:35 +03:00
|
|
|
- cron: '0 12 * * 1-4'
|
2020-05-26 18:01:05 +03:00
|
|
|
|
2020-05-26 19:06:40 +03:00
|
|
|
# releases are triggered on changes to this file
|
2020-05-26 16:16:22 +03:00
|
|
|
push:
|
2020-05-27 16:00:57 +03:00
|
|
|
branches:
|
|
|
|
- v2
|
2020-05-26 19:06:40 +03:00
|
|
|
paths:
|
|
|
|
- '.github/workflows/release.yaml'
|
2020-06-15 17:19:46 +03:00
|
|
|
- '.env.production'
|
2020-05-26 18:01:05 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
jobs:
|
2020-05-26 18:01:05 +03:00
|
|
|
bump_version:
|
|
|
|
name: Bump Version
|
2020-05-21 06:31:05 +03:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-26 18:01:05 +03:00
|
|
|
outputs:
|
|
|
|
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:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
- name: Bump version and push tag
|
2020-05-26 18:01:05 +03:00
|
|
|
id: github_tag_action
|
2020-05-27 19:29:49 +03:00
|
|
|
uses: mathieudutour/github-tag-action@v4.5
|
2020-05-21 06:31:05 +03:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
release_branches: .*
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-26 18:01:05 +03:00
|
|
|
create_release:
|
|
|
|
name: Create Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: bump_version
|
|
|
|
if: ${{ needs.bump_version.outputs.new_tag != null }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
- name: Install dependencies
|
2020-05-26 16:41:54 +03:00
|
|
|
run: yarn install --ignore-scripts --frozen-lockfile
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
- name: Build the IPFS bundle
|
|
|
|
run: yarn ipfs-build
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 21:08:34 +03:00
|
|
|
- name: Pin to IPFS
|
2020-05-21 21:30:31 +03:00
|
|
|
id: upload
|
2020-05-21 21:08:34 +03:00
|
|
|
uses: anantaramdas/ipfs-pinata-deploy-action@v1.5.2
|
2020-05-21 06:31:05 +03:00
|
|
|
with:
|
2020-05-26 18:01:05 +03:00
|
|
|
pin-name: Uniswap ${{ needs.bump_version.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
|
|
|
|
2020-05-26 20:01:38 +03:00
|
|
|
- name: Convert CIDv0 to CIDv1
|
|
|
|
id: convert_cidv0
|
|
|
|
uses: uniswap/convert-cidv0-cidv1@v1.0.0
|
|
|
|
with:
|
|
|
|
cidv0: ${{ steps.upload.outputs.hash }}
|
|
|
|
|
2020-05-22 15:07:49 +03:00
|
|
|
- name: Update DNS with new IPFS hash
|
2020-06-25 03:09:02 +03:00
|
|
|
env:
|
|
|
|
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
|
|
|
RECORD_DOMAIN: 'uniswap.org'
|
|
|
|
RECORD_NAME: '_dnslink.app'
|
|
|
|
CLOUDFLARE_TOKEN_ZONE_ID: ${{ secrets.CLOUDFLARE_TOKEN_ZONE_ID }}
|
2020-06-25 03:12:26 +03:00
|
|
|
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
|
2020-05-26 16:07:09 +03:00
|
|
|
with:
|
2020-06-25 03:09:02 +03:00
|
|
|
cid: ${{ steps.upload.outputs.hash }}
|
2020-05-22 15:07:49 +03:00
|
|
|
|
2020-05-21 21:30:31 +03:00
|
|
|
- name: Create GitHub Release
|
2020-05-21 06:31:05 +03:00
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1.1.0
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2020-05-26 18:01:05 +03:00
|
|
|
tag_name: ${{ needs.bump_version.outputs.new_tag }}
|
|
|
|
release_name: Release ${{ needs.bump_version.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:
|
2020-05-26 20:01:38 +03:00
|
|
|
- CIDv0: `${{ steps.upload.outputs.hash }}`
|
|
|
|
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}`
|
2020-05-21 06:31:05 +03:00
|
|
|
|
2020-06-10 20:55:35 +03:00
|
|
|
The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to store your settings.
|
|
|
|
**Beware** that other sites you access via the _same_ IPFS gateway can read and modify your settings on the Uniswap interface without your permission.
|
2020-06-25 03:15:18 +03:00
|
|
|
You can avoid this issue by using a subdomain IPFS gateway, or our alias to the latest release at [app.uniswap.org](https://app.uniswap.org).
|
|
|
|
The preferred URLs below are safe to use.
|
2020-05-23 23:07:23 +03:00
|
|
|
|
|
|
|
Preferred URLs:
|
2020-05-26 20:17:53 +03:00
|
|
|
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
|
2020-05-27 16:01:20 +03:00
|
|
|
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.cf-ipfs.com/
|
2020-05-23 23:07:23 +03:00
|
|
|
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/)
|
|
|
|
|
|
|
|
Other IPFS gateways:
|
2020-05-21 06:31:05 +03:00
|
|
|
- https://cloudflare-ipfs.com/ipfs/${{ steps.upload.outputs.hash }}/
|
|
|
|
- https://ipfs.infura.io/ipfs/${{ steps.upload.outputs.hash }}/
|
|
|
|
- https://ipfs.io/ipfs/${{ steps.upload.outputs.hash }}/
|
|
|
|
|
2020-05-26 19:15:43 +03:00
|
|
|
${{ needs.bump_version.outputs.changelog }}
|