chore(deps): bump actions/upload-artifact from 3 to 4 (#47287)

* chore(deps): bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update preview-build.yml

Signed-off-by: lijianan <574980606@qq.com>

* Update test.yml

Signed-off-by: lijianan <574980606@qq.com>

* test: fix Unable to upload to same artifact name from multiple jobs

https://github.com/actions/upload-artifact/issues/478#issuecomment-1885470013

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lijianan <574980606@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
dependabot[bot] 2024-02-02 22:38:36 +08:00 committed by GitHub
parent b10f71334c
commit 1da53ec53d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 13 deletions

View File

@ -77,7 +77,7 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: "--max_old_space_size=4096"
- name: upload site artifact - name: upload site artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: site name: site
path: _site/ path: _site/
@ -90,7 +90,7 @@ jobs:
- name: Upload PR number - name: Upload PR number
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: pr name: pr
path: ./pr-id.txt path: ./pr-id.txt
@ -116,7 +116,7 @@ jobs:
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: download site artifact - name: download site artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: site name: site
path: _site path: _site

View File

@ -207,16 +207,16 @@ jobs:
run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage
- name: persist coverages - name: persist coverages
if: ${{ matrix.module == 'dom' && matrix.react == '17' }} if: ${{ matrix.module == 'dom' && matrix.react == '18' }}
run: | run: |
mkdir persist-coverage mkdir persist-coverage
mv coverage/coverage-final.json persist-coverage/react-${{matrix.react}}-test-${{matrix.module}}-${{strategy.job-index}}.json mv coverage/coverage-final.json persist-coverage/react-${{matrix.react}}-test-${{matrix.module}}-${{strategy.job-index}}.json
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: ${{ matrix.module == 'dom' && matrix.react == '17' }} if: ${{ matrix.module == 'dom' && matrix.react == '18' }}
name: upload coverages name: upload coverages
with: with:
name: coverage-artifacts name: coverage-artifacts-${{ matrix.module }}-${{ matrix.react }}-${{ strategy.job-index }}
path: persist-coverage/ path: persist-coverage/
# node test # node test
@ -251,9 +251,10 @@ jobs:
with: with:
node-version: 18 node-version: 18
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: coverage-artifacts pattern: coverage-artifacts-*
merge-multiple: true
path: persist-coverage path: persist-coverage
- name: Merge Code Coverage - name: Merge Code Coverage
run: | run: |

View File

@ -95,7 +95,7 @@ jobs:
# Upload report in `visualRegressionReport` # Upload report in `visualRegressionReport`
- name: upload report artifact - name: upload report artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: ${{ always() }} if: ${{ always() }}
with: with:
name: visual-regression-report name: visual-regression-report
@ -109,7 +109,7 @@ jobs:
- name: Upload persist key - name: Upload persist key
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: visual-regression-diff-ref name: visual-regression-diff-ref
path: ./visual-regression-pr-id.txt path: ./visual-regression-pr-id.txt

View File

@ -77,7 +77,7 @@ jobs:
# Upload `imageSnapshots` on master # Upload `imageSnapshots` on master
- name: upload report artifact - name: upload report artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: image-snapshots name: image-snapshots
path: imageSnapshots.tar.gz path: imageSnapshots.tar.gz
@ -89,7 +89,7 @@ jobs:
- name: Upload persist key - name: Upload persist key
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: visual-regression-ref name: visual-regression-ref
path: ./visual-regression-ref.txt path: ./visual-regression-ref.txt