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:
|
|
|
|
- cron: '0 12 * * *'
|
2020-05-26 16:16:22 +03:00
|
|
|
# triggered releases, must have tag trigger-release on v2 branch
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- v2
|
|
|
|
tags:
|
|
|
|
- trigger-release
|
2020-05-21 06:31:05 +03:00
|
|
|
jobs:
|
|
|
|
create-release:
|
|
|
|
name: Create Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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
|
|
|
|
id: bump_version
|
|
|
|
uses: mathieudutour/github-tag-action@v4
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
release_branches: .*
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 21:12:49 +03:00
|
|
|
- name: Cancel this build if no new commits
|
2020-05-21 21:30:31 +03:00
|
|
|
if: ${{ steps.bump_version.outputs.new_tag == null }}
|
2020-05-21 21:01:43 +03:00
|
|
|
uses: andymckay/cancel-action@0.2
|
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 yarn
|
|
|
|
run: npm install -g yarn
|
2020-05-21 21:30:31 +03:00
|
|
|
|
2020-05-21 06:31:05 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn
|
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-21 21:08:34 +03:00
|
|
|
pin-name: Uniswap ${{ steps.bump_version.outputs.new_tag }}
|
|
|
|
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-22 15:07:49 +03:00
|
|
|
- name: Update DNS with new IPFS hash
|
|
|
|
id: update_dns
|
2020-05-26 16:07:09 +03:00
|
|
|
uses: ./actions/replace-vercel-dns-record
|
|
|
|
with:
|
|
|
|
domain: 'uniswap.org'
|
|
|
|
subdomain: '_dnslink.app'
|
|
|
|
record-type: 'TXT'
|
|
|
|
value: /ipfs/${{ steps.upload.outputs.hash }}
|
|
|
|
token: ${{ secrets.VERCEL_TOKEN }}
|
|
|
|
team-name: 'uniswap'
|
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:
|
|
|
|
tag_name: ${{ steps.bump_version.outputs.new_tag }}
|
|
|
|
release_name: Release ${{ steps.bump_version.outputs.new_tag }}
|
|
|
|
body: |
|
2020-05-23 23:07:23 +03:00
|
|
|
Release built from commit
|
|
|
|
[`${{ github.sha }}`](https://github.com/Uniswap/uniswap-frontend/tree/${{ github.sha }})
|
2020-05-21 06:31:05 +03:00
|
|
|
|
|
|
|
The IPFS hash of the bundle is `${{ steps.upload.outputs.hash }}`
|
|
|
|
|
2020-05-25 08:39:30 +03:00
|
|
|
Uniswap 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 Uniswap without your permission.
|
2020-05-23 23:07:23 +03:00
|
|
|
|
|
|
|
Preferred URLs:
|
|
|
|
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/)
|
|
|
|
- https://dweb.link/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 }}/
|
|
|
|
|
|
|
|
${{ steps.bump_version.outputs.changelog }}
|