-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from cosmology-tech/types/codegen
cli for typegen
- Loading branch information
Showing
18 changed files
with
296 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Generate Types | ||
|
||
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: | | ||
git submodule update --remote | ||
cd packages/chain-registry/chain-registry | ||
- name: Types Generation | ||
run: | | ||
git submodule update --remote | ||
CHANGES_DESC="build-$(date +%Y%m%d-%H%M%S)" | ||
yarn | ||
yarn build | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor}}@users.noreply.github.com" | ||
cd v2/types | ||
yarn types | ||
yarn build | ||
cd ../../ | ||
cd v2/interfaces | ||
yarn types | ||
yarn build | ||
cd ../../ | ||
git add . | ||
if ! git diff --staged --quiet; then | ||
git commit -am "build 🛠 $CHANGES_DESC" | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export * from './assetlist.schema'; | ||
export * from './chain.schema'; | ||
export * from './ibc_data.schema'; | ||
export * from './memo_keys.schema'; | ||
export * from './shared'; | ||
export * from './versions.schema'; | ||
export { Asset, AssetList } from './assetlist.schema'; | ||
export { Chain } from './chain.schema'; | ||
export { IBCData } from './ibc_data.schema'; | ||
export { MemoKeys } from './memo_keys.schema'; | ||
export { Versions } from './versions.schema'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export * from './assetlist.schema'; | ||
export * from './chain.schema'; | ||
export * from './ibc_data.schema'; | ||
export * from './memo_keys.schema'; | ||
export * from './shared'; | ||
export * from './versions.schema'; | ||
export { Asset, AssetList } from './assetlist.schema'; | ||
export { Chain } from './chain.schema'; | ||
export { IBCData } from './ibc_data.schema'; | ||
export { MemoKeys } from './memo_keys.schema'; | ||
export { Versions } from './versions.schema'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.