Skip to content

Commit

Permalink
Revert "delete some workflows and release configs"
Browse files Browse the repository at this point in the history
This reverts commit 335bfd8.
  • Loading branch information
dantaik committed Nov 4, 2024
1 parent 335bfd8 commit 5bd41db
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/snaefell-ui--ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Snaefell UI

on: workflow_call

jobs:
build:
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
# This step is needed because the .env file is not committed to the repository
# and the Svelte check complains about not finding the exports from $env/static/public,
# which will be generated based on the .env file when running `svelte-kit sync`
- name: Copy .env.example to .env
working-directory: ./packages/snaefell-ui
run: cp .env.example .env

- name: Frontend build
working-directory: ./packages/snaefell-ui
env:
NODE_OPTIONS: --max-old-space-size=32768
run: pnpm build

- name: Svelte check
working-directory: ./packages/snaefell-ui
run: pnpm check

- name: Check formatting
working-directory: ./packages/snaefell-ui
run: pnpm lint

- name: Unit tests
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/snaefell-ui
run: pnpm test:unit
45 changes: 45 additions & 0 deletions .github/workflows/snaefell-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Snaefell UI CI/CD

on:
push:
paths:
- "packages/snaefell-ui/**"
branches-ignore:
- dependabot/**
tags:
- "snaefull-ui-v*"

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/snaefell-ui/**"

jobs:
build-and-test:
uses: ./.github/workflows/snaefell-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(snaefell-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
# The following Vercel project is not found, so disable it at least for now.
# deploy_snaefell-ui_mainnet_preview:
# if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
# environment: "preview"
# flags: ""
# secrets:
# vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_SNAEFELL_UI_MAINNET }}
# vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
# vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_snaefell-ui_mainnet_production:
if: ${{ startsWith(github.ref, 'refs/tags/snaefull-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "production"
flags: "--prod"
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_SNAEFELL_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/taikoon-ui--ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Taikoon UI Build and Checks

on: workflow_call

jobs:
build:
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
# This step is needed because the .env file is not committed to the repository
# and the Svelte check complains about not finding the exports from $env/static/public,
# which will be generated based on the .env file when running `svelte-kit sync`
- name: Copy .env.example to .env
working-directory: ./packages/taikoon-ui
run: cp .env.example .env

- name: Frontend build
working-directory: ./packages/taikoon-ui
run: pnpm build

- name: Svelte check
working-directory: ./packages/taikoon-ui
run: pnpm check

- name: Check formatting
working-directory: ./packages/taikoon-ui
run: pnpm lint

- name: Unit tests
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/taikoon-ui
run: pnpm test:unit
42 changes: 42 additions & 0 deletions .github/workflows/taikoon-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Taikoon UI CI/CD

on:
push:
paths:
- "packages/taikoon-ui/**"
branches-ignore:
- dependabot/**

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/taikoon-ui/**"

jobs:
build-and-test:
uses: ./.github/workflows/taikoon-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(taikoon-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
# deploy_taikoon-ui_mainnet_preview:
# if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
# environment: "preview"
# flags: ""
# secrets:
# vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_TAIKOON_UI_MAINNET }}
# vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
# vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_taikoon-ui_mainnet_production:
if: ${{ startsWith(github.ref, 'refs/tags/taikoon-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "production"
flags: "--prod"
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_TAIKOON_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
6 changes: 5 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
"packages/guardian-prover-health-check-ui": {},
"packages/protocol": {},
"packages/relayer": {},
"packages/nfts": {},
"packages/taikoon-ui": {},
"packages/taiko-client": {},
"packages/ui-lib": {}
"packages/supplementary-contracts": {},
"packages/ui-lib": {},
"packages/snaefell-ui": {}
}
}

0 comments on commit 5bd41db

Please sign in to comment.