Sync Components types #23
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: Sync Components types | |
on: | |
schedule: | |
- cron: '0 0 * * 6' | |
push: | |
branches: | |
- dev-ci | |
jobs: | |
sync-components-types: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Checkout taro-docs | |
uses: actions/checkout@v3 | |
with: | |
repository: NervJS/taro-docs | |
fetch-depth: 1 | |
path: .taro-docs | |
- run : | | |
cp .taro-docs/packages/taro-components/types/* packages/taro-components/types | |
rm -rf .taro-docs | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: install | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 7 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile, --strict-peer-dependencies] | |
- args: [--filter @tarojs/components, -D, miniapp-types@latest] | |
- name: build | |
run: pnpm build | |
- name: execute sync script | |
run: | | |
pnpm --filter=@tarojs/components run sync:types | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "refactor(types): sync components types" | |
title: "refactor(types): sync components types" | |
body: "sync components types" | |
labels: | | |
A-typings | |
A-components | |