From 75ab2d7413c41d17831e9791076333fffb1dbb45 Mon Sep 17 00:00:00 2001 From: zengyue ye Date: Fri, 17 Feb 2023 11:18:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=BB=E5=B9=B2?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E6=9E=84=E5=BB=BA=20action=20(#1730?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 37 +++++++++++++++ .github/workflows/ci-18.yml | 60 ------------------------- .github/workflows/{ci-16.yml => ci.yml} | 4 +- packages/f2/.fatherrc.js | 2 +- 4 files changed, 40 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci-18.yml rename .github/workflows/{ci-16.yml => ci.yml} (97%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..0bfe56e3d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: master build + +on: + push: + branches: + - v5.0.x + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: install + run: yarn install + + - name: build + run: npm run build + env: + CI: false + + - name: save build + uses: actions/upload-artifact@v3 + with: + name: build + path: | + packages/*/dist/*.js + !**/node_modules/** diff --git a/.github/workflows/ci-18.yml b/.github/workflows/ci-18.yml deleted file mode 100644 index d86b75c19..000000000 --- a/.github/workflows/ci-18.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI-18 - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: [push, pull_request] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "ci" - ci: - # The type of runner that the job will run on - runs-on: macos-latest - - strategy: - matrix: - node_version: ['18'] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node_version }} - - - name: install - run: | - yarn install - - - name: lint - run: | - npm run lint - env: - CI: true - - - name: build - run: | - npm run build - env: - CI: true - - - name: test - run: | - npm run test - env: - CI: true - - - name: save diff snapshot - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: diff snapshot - path: | - packages/**/__image_snapshots__/__diff_output__/*.png - !**/node_modules/** diff --git a/.github/workflows/ci-16.yml b/.github/workflows/ci.yml similarity index 97% rename from .github/workflows/ci-16.yml rename to .github/workflows/ci.yml index 6d6dd9ca8..c6cf31b46 100644 --- a/.github/workflows/ci-16.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: CI-16 +name: CI # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node_version: ['16'] + node_version: ['16', '18'] # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/packages/f2/.fatherrc.js b/packages/f2/.fatherrc.js index c3f3da8ee..ba3fdf926 100644 --- a/packages/f2/.fatherrc.js +++ b/packages/f2/.fatherrc.js @@ -1,7 +1,7 @@ import { visualizer } from 'rollup-plugin-visualizer'; const isBundleVis = !!process.env.BUNDLE_VIS; -export default process.env.CI +export default process.env.CI && process.env.CI !== 'false' ? {} : { umd: {