Merge pull request #52 from freeshineit/develop #18
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: build-examples | |
on: | |
push: | |
branches: ['master', 'develop'] | |
pull_request: | |
branches: ['master'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 21.x, 22.x] # bfj@8.0.0: The engine "node" is incompatible with this module. Expected version ">= 18.0.0". | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# 不用pnpm是因为pnpm的workspace的影响 | |
- name: Build cra-app | |
working-directory: ./examples/cra-app | |
run: | | |
yarn install | |
yarn run build | |
env: | |
CI: false | |
- name: Build with-vite | |
working-directory: ./examples/with-vite | |
run: | | |
yarn install | |
yarn run build |