diff --git a/unity-project/action.yaml b/unity-project/action.yaml index da48d6e..2677f07 100644 --- a/unity-project/action.yaml +++ b/unity-project/action.yaml @@ -34,6 +34,10 @@ inputs: sshPrivateKey: description: "Private SSH key to use for git package restoration." required: false + downloadKeystore: + description: "Whether or not to download the keystore for Android builds. Defaults to true if the platform is android." + required: false + default: "" runs: using: "composite" steps: @@ -43,7 +47,27 @@ runs: PROJECT_PATH=${{ inputs.projectPath }} PROJECT_PATH=${PROJECT_PATH// /\\ } echo "projectPath=$PROJECT_PATH" >> "$GITHUB_OUTPUT" + + DOWNLOAD_KEYSTORE=${{ inputs.downloadKeystore }} + if [ -z "$DOWNLOAD_KEYSTORE" ]; then + if [[ "${{ inputs.platform }}" = "android" ]]; then + DOWNLOAD_KEYSTORE=true + else + DOWNLOAD_KEYSTORE=false + fi + fi + echo "downloadKeystore=$DOWNLOAD_KEYSTORE" >> "$GITHUB_OUTPUT" shell: bash + - name: "Download Keystore" + if: ${{ steps.path.outputs.downloadKeystore == 'true' }} + uses: act/common/minio/mc-cp@master + with: + alias: minio + target: minio/artifacts/studiowhy.keystore + dest: ${{ steps.path.outputs.projectPath }}/studiowhy.keystore + accessKey: ${{ secrets.MINIO_ACCESS_KEY }} + secretKey: ${{ secrets.MINIO_SECRET_KEY }} + url: ${{ secrets.MINIO_URL }} - name: "Get Unity Version." id: getVersion uses: act/unity/unity-get-version@master