Skip to content

Generate Types Dry Run #7

Generate Types Dry Run

Generate Types Dry Run #7

name: Generate Types Dry Run
on:
workflow_dispatch:
jobs:
generate-types:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
with:
submodules: 'recursive' # Ensures submodules are also checked out
- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
- name: Update Git Submodules 🔄
run: |
make use-cosmos
- name: Install Dependencies 🧶
run: |
yarn install
yarn symlink
- name: Build Project 🏗️
run: |
yarn build
yarn symlink
- name: Types Generation 🛠
run: |
# Generate types and interfaces
pushd workflows/generate-types
yarn generate:types
yarn generate:interfaces
popd
# Build types
pushd v2/types
yarn build
popd
# Build interfaces
pushd v2/interfaces
yarn build
popd
# Generate and build code for chain registry
pushd v2/chain-registry
yarn codegen
yarn build
popd
# check changes
git add .
if ! git diff --staged --quiet; then
echo "GIT_RESULT=Changes to commit and/or publish." >> $GITHUB_ENV
else
echo "GIT_RESULT=No changes to commit." >> $GITHUB_ENV
fi
- name: Git Result
run: |
echo $GIT_RESULT