diff --git a/.github/workflows/add-label.yml b/.github/workflows/add-label.yml new file mode 100644 index 0000000000..0f7f6e7942 --- /dev/null +++ b/.github/workflows/add-label.yml @@ -0,0 +1,33 @@ +name: Add Label + +on: + pull_request_target: + types: [opened, synchronize, reopened] + workflow_dispatch: + +jobs: + add-label: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Determine label based on target branch + id: determine-label + run: | + echo "${{github.event_name}}" + if [[ "${{ github.event.pull_request.base.ref }}" == "next" ]]; then + echo "label=2.x" >> $GITHUB_ENV + elif [[ "${{ github.event.pull_request.base.ref }}" == "V3.0" ]]; then + echo "label=3.x" >> $GITHUB_ENV + else + echo "label=" >> $GITHUB_ENV + fi + + - name: Add label to Pull Request + if: env.label != '' + uses: actions-ecosystem/action-add-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: ${{ env.label }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f804ad3e4d..dd3035c323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: - next - V3.0 - pull_request_target: + pull_request: types: [opened, synchronize, reopened] workflow_dispatch: @@ -80,30 +80,5 @@ jobs: run: npm run build:site - name: Build NutUI-React Taro H5 Demo - run: npm run build:taro:site - - add-label: - runs-on: ubuntu-latest - - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Determine label based on target branch - id: determine-label - run: | - echo "${{github.event_name}}" - if [[ "${{ github.event.pull_request.base.ref }}" == "next" ]]; then - echo "label=2.x" >> $GITHUB_ENV - elif [[ "${{ github.event.pull_request.base.ref }}" == "V3.0" ]]; then - echo "label=3.x" >> $GITHUB_ENV - else - echo "label=" >> $GITHUB_ENV - fi - - - name: Add label to Pull Request - if: env.label != '' - uses: actions-ecosystem/action-add-labels@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - labels: ${{ env.label }} \ No newline at end of file + if: github.ref == 'refs/heads/next' + run: npm run build:taro:site \ No newline at end of file diff --git a/src/packages/range/__test__/__snapshots__/range.spec.tsx.snap b/src/packages/range/__test__/__snapshots__/range.spec.tsx.snap index 54cf3cc390..3494ed0464 100644 --- a/src/packages/range/__test__/__snapshots__/range.spec.tsx.snap +++ b/src/packages/range/__test__/__snapshots__/range.spec.tsx.snap @@ -41,55 +41,8 @@ exports[`range props test 1`] = ` `; -exports[`range props test 2`] = ` -
-
-
- 0 -
-
-
-
-
-
- 40 -
-
-
-
-
-
- 100 -
-
-
-`; - exports[`range test 1`] = ` "
0
30
60
100
" `; - -exports[`range test 2`] = ` -"
0
30
60
100
" -`; diff --git a/src/packages/textarea/__test__/__snapshots__/textarea.spec.tsx.snap b/src/packages/textarea/__test__/__snapshots__/textarea.spec.tsx.snap index b5b0966c3b..267cbf37ac 100644 --- a/src/packages/textarea/__test__/__snapshots__/textarea.spec.tsx.snap +++ b/src/packages/textarea/__test__/__snapshots__/textarea.spec.tsx.snap @@ -8,7 +8,7 @@ exports[`textarea props test 1`] = `