Skip to content

chore: release main (#5254) #1567

chore: release main (#5254)

chore: release main (#5254) #1567

Workflow file for this run

name: Deployment
on:
# build when pushing to main/develop, or create a release
push:
branches: [ main, develop ]
tags: [ cowswap-v*, explorer-v* ]
workflow_dispatch: # Manually trigger it via UI/CLI/API
inputs:
app:
description: App to deploy
required: true
type: choice
options:
- COWSWAP
- EXPLORER
- ALL
jobs:
vercel-dev:
# Deploys to Vercel dev environment
name: Vercel dev
if: github.ref == 'refs/heads/develop'
uses: ./.github/workflows/vercel.yml
secrets: inherit
strategy:
matrix:
app: [ EXPLORER, COWSWAP ]
with:
env_name: dev
app: ${{ matrix.app }}
vercel-pre-prod:
# Deploys to Vercel staging and barn environments only when there is a tag for CowSwap or Explorer
name: Vercel pre-prod
if: startsWith(github.ref, 'refs/tags')
uses: ./.github/workflows/vercel.yml
secrets: inherit
strategy:
matrix:
env_name: [ barn, staging ] # deploys both in parallel
with:
env_name: ${{ matrix.env_name }}
# Pick app according to published tag
app: ${{ startsWith(github.ref, 'refs/tags/explorer') && 'EXPLORER' || 'COWSWAP' }}
vercel-prod:
# Deploys to Vercel prod environment
name: Vercel prod
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/vercel.yml
secrets: inherit
strategy:
matrix:
app: ${{ inputs.app == 'ALL' && fromJSON('["COWSWAP","EXPLORER"]') || fromJSON(format('["{0}"]', inputs.app)) }}
with:
env_name: prod
app: ${{ matrix.app }}