79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
name: Deploy Oko Attached
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PRJ_ID__OKO_ATTACHED }}
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
git_tag:
|
|
description: >
|
|
"Git tag for deployment (format: develop/v0.0.1 or release/v0.0.1)"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout self repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.git_tag }}
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Check Node version
|
|
run: node -v
|
|
|
|
- name: Check git tag
|
|
run: node ./internals/github/dist/validate_git_tag.js
|
|
env:
|
|
GIT_TAG: "${{ inputs.git_tag }}"
|
|
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
|
|
- name: Yarn version
|
|
run: yarn -v
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
|
|
- name: Build CS packages
|
|
run: yarn ci build_cs
|
|
|
|
- name: Build Frost packages
|
|
run: yarn ci build_frost
|
|
|
|
- name: Build internal packages
|
|
run: yarn ci build_pkgs
|
|
|
|
- name: Build SDK packages
|
|
run: yarn ci build_sdk
|
|
|
|
- name: Determine deploy environment
|
|
id: deploy_env
|
|
run: node ./internals/github/dist/determine_deploy_env.js
|
|
env:
|
|
GIT_TAG: "${{ inputs.git_tag }}"
|
|
|
|
- name: Install Vercel CLI
|
|
run: npm install -g vercel@latest
|
|
|
|
- name: Pull Vercel Environment Information
|
|
run: vercel pull --yes --environment=${{ steps.deploy_env.outputs.vercel_env }} --token=${{ secrets.VERCEL_TOKEN }}
|
|
|
|
- name: Build Project Artifacts
|
|
run: vercel build ${{ steps.deploy_env.outputs.vercel_build_flag }} --token=${{ secrets.VERCEL_TOKEN }}
|
|
|
|
- name: Deploy Project Artifacts to Vercel
|
|
run: vercel deploy --prebuilt ${{ steps.deploy_env.outputs.vercel_deploy_flag }} --token=${{ secrets.VERCEL_TOKEN }}
|