-
Notifications
You must be signed in to change notification settings - Fork 35
75 lines (62 loc) · 1.75 KB
/
v1-codegen-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Codegen Main V1
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 update-registry
- name: V1 Operations 🛠
run: |
pushd v1
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 }}