From a5d80952b735eec95877fcd5807e748135db8bec Mon Sep 17 00:00:00 2001 From: Scion Date: Sat, 12 Jul 2025 00:11:30 -0700 Subject: [PATCH] Updated find information. --- unity-project-cached-artifacts/action.yaml | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/unity-project-cached-artifacts/action.yaml b/unity-project-cached-artifacts/action.yaml index d2b50e3..ad2ad27 100644 --- a/unity-project-cached-artifacts/action.yaml +++ b/unity-project-cached-artifacts/action.yaml @@ -78,7 +78,7 @@ outputs: runs: using: "composite" steps: - - name: "Build Unity Project" + - name: "Build Unity Project." uses: act/unity/unity-project-cached@master with: projectPath: ${{ inputs.projectPath }} @@ -100,16 +100,28 @@ runs: - name: "Get product name." id: get_product_name uses: act/unity/unity-get-product-name@master - - name: "Find Output Directory" + - name: "Configure find parameters." + id: configure_find + run: | + # Configure the pattern and type based on the platform. Android is case insensitive. + if [[ "${{ inputs.platform }},,}" = "android" ]]; then + echo "pattern=*.apk" >> "$GITHUB_OUTPUT" + echo "type=f" >> "$GITHUB_OUTPUT" + else + echo "pattern=*" >> "$GITHUB_OUTPUT" + echo "type=d" >> "$GITHUB_OUTPUT" + fi + shell: bash + - name: "Find Output Directory." id: find_output_dir uses: act/common/utils/find-first@master with: path: Build - pattern: "*" - type: d + pattern: "${{ steps.configure_find.outputs.pattern }}" + type: "${{ steps.configure_find.outputs.type }}" minDepth: 1 - maxDepth: 1 - - name: "Upload Artifacts" + maxDepth: 2 + - name: "Upload Artifacts." uses: https://github.com/ChristopherHX/gitea-upload-artifact@v4 with: name: "${{ steps.get_product_name.outputs.nameShort }}_${{ inputs.artifactSuffix }}"