Skip to content

feat: replace cp template #200

feat: replace cp template

feat: replace cp template #200

Workflow file for this run

name: dodoGenerate
on:
push:
paths:
- 'packages/contract-call-generate/**'
- 'packages/dodo-contract-request/contract-config/**'
- 'packages/dodo-contract-request/scripts/contract-generate.ts'
- '.github/workflows/dodo-generate.yml'
jobs:
generate:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.9.0]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: restore lerna
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-lerna-${{ hashFiles('**/yarn.lock') }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: restore yarn
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: Build
run: yarn workspace @dodoex/contract-call-generate build && yarn workspace @dodoex/contract-request build
- name: Generate
run: yarn workspace @dodoex/dodo-contract-request contract:generate
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
- name: Add and commit
run: >
export COMMIT_MESSAGE="chore: generate contract [skip ci]" && yarn git:commit
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.REF_NAME }}