Skip to content

Commit

Permalink
ci(repo): add vercel actions for frontend releases (#15782)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored Feb 20, 2024
1 parent 220957d commit d4880fd
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
- opened
- edited
- synchronize
merge_group:
push:
branches:
- release-please-* # Trigger for release-please PRs, but skip the job
merge_group: # Trigger in the merge queue, but skip the job

jobs:
validate-pr-title:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/vercel-releases/bridge-ui-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI }}

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/bridge-ui-v2/**"

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/vercel-releases/bridge-ui-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI }}

on:
push:
tags:
- "bridge-ui-v2-*"

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/vercel-releases/fork-diff-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FORK_DIFF }}

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/fork-diff/**"

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/vercel-releases/fork-diff-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FORK_DIFF }}

on:
push:
tags:
- "fork-diff-*"

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI }}

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/guardian-prover-health-check-ui/**"

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI }}

on:
push:
tags:
- "guardian-prover-health-check-ui-*"

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 2 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"packages/bridge-ui-v2": "2.9.0",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
"packages/guardian-prover-health-check-ui": "0.1.0",
"packages/protocol": "0.15.2",
"packages/relayer": "0.12.0"
}
4 changes: 2 additions & 2 deletions packages/guardian-prover-health-check-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "guardian-ui",
"version": "0.0.1",
"name": "guardian-prover-health-check-ui",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
5 changes: 5 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
"packages/bridge-ui-v2": {},
"packages/eventindexer": {},
"packages/fork-diff": {},
"packages/guardian-prover-health-check": {},
"packages/guardian-prover-health-check-ui": {
"release-as": "0.1.0"
},
"packages/protocol": {},
"packages/relayer": {}
},
"bump-minor-pre-major": true,
"separate-pull-requests": true
}

0 comments on commit d4880fd

Please sign in to comment.