Skip to content

Codegen Main V2

Codegen Main V2 #36

name: Codegen Main V2
on:
schedule:
# Runs every day at 2:00 AM UTC
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Node.js 🌐
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
- name: Update Git Submodules 🔄
run: |
make update-registry
- name: V2 Operations 🛠
run: |
pushd v2
yarn install
yarn symlink
yarn build
yarn symlink
# Code generation and build for various packages
pushd packages/chain-registry
yarn codegen
yarn build
popd
# pushd packages/assets
# yarn codegen
# popd
# pushd packages/osmosis
# yarn codegen
# popd
# pushd packages/juno
# yarn codegen
# popd
popd
- name: Commit Changes
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
if ! git diff --staged --quiet; then
git commit -am "build 🛠 build-$(date +%Y%m%d-%H%M%S)"
git push origin main
echo "GIT_RESULT=Published." >> $GITHUB_ENV
else
echo "GIT_RESULT=No changes to commit." >> $GITHUB_ENV
fi
- name: Git Ops
run: |
echo $GIT_RESULT
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}