on: push: # Sequence of patterns matched against refs/tags tags: - 'v*' name: Build and Release jobs: build: name: Global Job strategy: matrix: node: ['10.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@master - uses: actions/setup-node@master with: node-version: ${{ matrix.node }} - run: npm install -g yarn - run: yarn - run: yarn build env: REACT_APP_FORTMATIC_KEY: ${{ secrets.REACT_APP_FORTMATIC_KEY }} REACT_APP_NETWORK_ID: ${{ secrets.REACT_APP_NETWORK_ID }} REACT_APP_NETWORK_URL: ${{ secrets.REACT_APP_NETWORK_URL }} REACT_APP_PORTIS_ID: ${{ secrets.REACT_APP_PORTIS_ID }} - name: Create Release id: create_release uses: actions/create-release@v1.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false prerelease: false - name: Zip the build uses: thedoctor0/zip-release@master with: filename: 'build.zip' path: './build' exclusions: 'x' - uses: 'finnp/create-file-action@master' env: FILE_NAME: 'README.md' FILE_DATA: "# How to Run Uniswap Locally\n1. Download build.zip and unzip\n2. Serve this folder locally (instructions [here](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server))" - name: Upload Build id: build-asset uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: build.zip asset_name: build.zip asset_content_type: application/zip - name: Upload setup id: instructions-asset uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: README.md asset_name: README.md asset_content_type: application/zip