Commit d4f1c579 authored by Moody Salem's avatar Moody Salem

chore(release): remove cancel action because it's confusing

parent 95f35418
...@@ -3,28 +3,38 @@ on: ...@@ -3,28 +3,38 @@ on:
# every morning # every morning
schedule: schedule:
- cron: '0 12 * * *' - cron: '0 12 * * *'
# triggered releases, must have tag trigger-release on v2 branch
# triggered releases, must have tag trigger-release
push: push:
tags: tags:
- trigger-release - trigger-release
jobs: jobs:
create-release: bump_version:
name: Create Release name: Bump Version
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.github_tag_action.outputs.new_tag }}
changelog: ${{ steps.github_tag_action.outputs.changelog }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Bump version and push tag - name: Bump version and push tag
id: bump_version id: github_tag_action
uses: mathieudutour/github-tag-action@v4 uses: mathieudutour/github-tag-action@v4
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: .* release_branches: .*
- name: Cancel this build if no new commits create_release:
if: ${{ steps.bump_version.outputs.new_tag == null }} name: Create Release
uses: andymckay/cancel-action@0.2 runs-on: ubuntu-latest
needs: bump_version
if: ${{ needs.bump_version.outputs.new_tag != null }}
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
...@@ -40,7 +50,7 @@ jobs: ...@@ -40,7 +50,7 @@ jobs:
id: upload id: upload
uses: anantaramdas/ipfs-pinata-deploy-action@v1.5.2 uses: anantaramdas/ipfs-pinata-deploy-action@v1.5.2
with: with:
pin-name: Uniswap ${{ steps.bump_version.outputs.new_tag }} pin-name: Uniswap ${{ needs.bump_version.outputs.new_tag }}
path: './build' path: './build'
pinata-api-key: ${{ secrets.PINATA_API_KEY }} pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }} pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
...@@ -61,8 +71,8 @@ jobs: ...@@ -61,8 +71,8 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ steps.bump_version.outputs.new_tag }} tag_name: ${{ needs.bump_version.outputs.new_tag }}
release_name: Release ${{ steps.bump_version.outputs.new_tag }} release_name: Release ${{ needs.bump_version.outputs.new_tag }}
body: | body: |
Release built from commit Release built from commit
[`${{ github.sha }}`](https://github.com/Uniswap/uniswap-frontend/tree/${{ github.sha }}) [`${{ github.sha }}`](https://github.com/Uniswap/uniswap-frontend/tree/${{ github.sha }})
...@@ -81,4 +91,4 @@ jobs: ...@@ -81,4 +91,4 @@ jobs:
- https://ipfs.infura.io/ipfs/${{ steps.upload.outputs.hash }}/ - https://ipfs.infura.io/ipfs/${{ steps.upload.outputs.hash }}/
- https://ipfs.io/ipfs/${{ steps.upload.outputs.hash }}/ - https://ipfs.io/ipfs/${{ steps.upload.outputs.hash }}/
${{ steps.bump_version.outputs.changelog }} ${{ needs.bump_version.outputs.new_tag.changelog }}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment