-
Notifications
You must be signed in to change notification settings - Fork 36
51 lines (48 loc) · 1.33 KB
/
npm-publish.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
name: Publish
on:
schedule:
# Runs every day at 1:00 AM UTC
- cron: "0 1 * * *"
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "true"
- uses: actions/setup-node@v3
with:
node-version: 16.14.0
registry-url: https://registry.npmjs.org/
- run: |
yarn
yarn bootstrap
yarn build
cd packages/chain-registry
yarn codegen
yarn build
cd ../../
cd packages/assets
yarn codegen
cd ../../
cd packages/osmosis
yarn codegen
cd ../../
cd packages/juno
yarn codegen
cd ../../
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
BRANCH_NAME="build-$(date +%Y%m%d-%H%M%S)"
git checkout -b $BRANCH_NAME
git add .
if ! git diff --staged --quiet; then
git commit -am "build 🛠 $BRANCH_NAME"
git push origin $BRANCH_NAME
else
echo "No changes to commit."
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}