Skip to content

Sync Components types #51

Sync Components types

Sync Components types #51

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@v4
- name: Checkout taro-docs
uses: actions/checkout@v4
with:
repository: NervJS/taro-docs
fetch-depth: 1
path: .taro-docs
- run : |
cp -r .taro-docs/packages/taro/types/* packages/taro/types
cp -r .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/[email protected]
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 }}
base: main
body: "sync components types"
branch: "refactor/sync-types"
commit-message: "refactor(types): sync components types"
delete-branch: true
title: "refactor(types): sync components types"
labels: |
A-typings
A-components