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: