regenerate chaintypes #623
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
name: regenerate chaintypes | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '00 00,12 * * *' # twice a day | |
jobs: | |
regen-chaintypes: | |
runs-on: ubuntu-latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{secrets.GH_PAT_CHAINTYPES}} | |
- name: Setup GH user | |
run: | | |
git config --global user.email "hi@coongcrafts.io" | |
git config --global user.name "debot" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- run: yarn install --immutable | |
- name: Generate chaintypes | |
run: yarn gen && yarn build | |
- name: Commit changes && publish release | |
run: | | |
git add -A | |
git diff-index --quiet HEAD || { git commit -m "chore: regenerate chaintypes" && npx lerna publish minor -m "chore(release): publish %s - [skip ci]" --no-private --yes; } |