-
Notifications
You must be signed in to change notification settings - Fork 38
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 #109 from cosmology-tech/pkg/types
types
- Loading branch information
Showing
17 changed files
with
261 additions
and
111 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
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,76 @@ | ||
name: Codegen Main | ||
|
||
on: | ||
schedule: | ||
# Runs every day at 1:00 AM UTC | ||
- cron: "0 1 * * *" | ||
|
||
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 use-cosmos | ||
- name: Install Dependencies 🧶 | ||
run: | | ||
yarn install | ||
yarn symlink | ||
- name: Build Project 🏗️ | ||
run: | | ||
yarn build | ||
yarn symlink | ||
- name: Code Generation 🛠 | ||
run: | | ||
# 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 | ||
# Stage all changes and commit if there are any changes | ||
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 }} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
.PHONY: def use-cosmos use-fixtures | ||
|
||
def: | ||
git submodule update --remote | ||
def: use-cosmos | ||
|
||
use-cosmos: | ||
@echo "Switching submodule to use cosmos/chain-registry" | ||
git config submodule.packages/chain-registry/chain-registry.url https://github.com/cosmos/chain-registry | ||
git submodule sync packages/chain-registry/chain-registry | ||
git submodule update --init --remote packages/chain-registry/chain-registry | ||
@echo "Submodule is now using cosmos/chain-registry" | ||
|
||
use-fixtures: | ||
@echo "Switching submodule to use cosmology-tech/chain-registry-fixtures" | ||
git config submodule.packages/chain-registry/chain-registry.url https://github.com/cosmology-tech/chain-registry-fixtures | ||
git submodule sync packages/chain-registry/chain-registry | ||
git submodule update --init --remote packages/chain-registry/chain-registry | ||
@echo "Submodule is now using cosmology-tech/chain-registry-fixtures" |
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.