From 171a724a37217db0aabba6810d7db7aad2890a9f Mon Sep 17 00:00:00 2001 From: Scion Date: Sat, 12 Jul 2025 17:30:11 -0700 Subject: [PATCH] Added cleanup. --- unity-project-cached-artifacts/action.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/unity-project-cached-artifacts/action.yaml b/unity-project-cached-artifacts/action.yaml index 5aa3208..e3d48ae 100644 --- a/unity-project-cached-artifacts/action.yaml +++ b/unity-project-cached-artifacts/action.yaml @@ -123,6 +123,15 @@ runs: type: "${{ steps.configure_find.outputs.type }}" minDepth: 1 maxDepth: 2 + - name: "Clean DoNotShip folders." + if: ${{ steps.configure_find.outputs.type == 'd' }} + run: | + # Remove folders containing "DoNotShip" or "DontShip" from the output directory + OUTPUT_DIR="${{ steps.find_output_dir.outputs.fullPath }}" + if [[ -d "$OUTPUT_DIR" ]]; then + find "$OUTPUT_DIR" -type d \( -name "*DoNotShip*" -o -name "*DontShip*" \) -exec rm -rf {} + 2>/dev/null || true + fi + shell: bash - name: "Upload Artifacts." uses: https://github.com/ChristopherHX/gitea-upload-artifact@v4 with: