From 35744878ad6c9d39df10a46a1e12ac8be82122d7 Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 1 Jul 2025 10:40:34 +0800 Subject: [PATCH 1/2] feat: support upload mics after building --- .github/actions/artifact/upload/action.yml | 14 ++++++++++++-- .github/workflows/reusable-build-build.yml | 9 +++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/actions/artifact/upload/action.yml b/.github/actions/artifact/upload/action.yml index 465452fe6572..f25ef521d377 100644 --- a/.github/actions/artifact/upload/action.yml +++ b/.github/actions/artifact/upload/action.yml @@ -13,6 +13,16 @@ inputs: description: "Force upload to github" default: false require: false + if-no-files-found: + required: false + description: > + The desired behavior if no files are found using the provided path. + + Available Options: + warn: Output a warning but do not fail the action + error: Fail the action with an error message + ignore: Do not output any warnings or errors, the action does not fail + default: "error" runs: using: composite @@ -23,7 +33,7 @@ runs: with: name: ${{ inputs.name }} path: ${{ inputs.path }} - if-no-files-found: error + if-no-files-found: ${{ inputs.if-no-files-found }} overwrite: true - name: Upload artifact to local uses: lynx-infra/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #dev @@ -31,5 +41,5 @@ runs: with: name: ${{ inputs.name }} path: ${{ inputs.path }} - if-no-files-found: error + if-no-files-found: ${{ inputs.if-no-files-found }} overwrite: true diff --git a/.github/workflows/reusable-build-build.yml b/.github/workflows/reusable-build-build.yml index ce5bc930e824..a7d397d6f128 100644 --- a/.github/workflows/reusable-build-build.yml +++ b/.github/workflows/reusable-build-build.yml @@ -192,3 +192,12 @@ jobs: crates/node_binding/*.node crates/node_binding/*.d.ts crates/node_binding/rspack.wasm32-wasi.wasm + + # For collection building misc files, such as cargo-timing.html + - name: Upload Misc + uses: ./.github/actions/artifact/upload + with: + name: building_misc-${{ inputs.target }} + if-no-files-found: ignore + path: | + target/cargo-timings/cargo-timing.html From 7f6a90bcb69890f1564633d0bcf55d0d83d71636 Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 1 Jul 2025 10:48:59 +0800 Subject: [PATCH 2/2] feat: add artiffact misc --- .github/workflows/reusable-build-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-build.yml b/.github/workflows/reusable-build-build.yml index a7d397d6f128..547baea54f76 100644 --- a/.github/workflows/reusable-build-build.yml +++ b/.github/workflows/reusable-build-build.yml @@ -197,7 +197,7 @@ jobs: - name: Upload Misc uses: ./.github/actions/artifact/upload with: - name: building_misc-${{ inputs.target }} + name: buildi-misc-${{ inputs.target }} if-no-files-found: ignore path: | target/cargo-timings/cargo-timing.html