From 44cd79b3df43afd9240d5be727717d774aa35002 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Wed, 13 Nov 2024 12:43:25 -0800 Subject: [PATCH] Update the upload download actions to v4 (#1143) --- .github/workflows/build_android.yml | 2 +- .github/workflows/build_ios.yml | 2 +- .github/workflows/build_linux.yml | 4 +- .github/workflows/build_macos.yml | 2 +- .github/workflows/build_tvos.yml | 2 +- .github/workflows/build_windows.yml | 2 +- .github/workflows/generate_swig.yml | 2 +- .github/workflows/integration_tests.yml | 51 +++++++++++++------------ .github/workflows/package.yml | 8 ++-- 9 files changed, 38 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index 08cbf873..4613f6af 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -135,7 +135,7 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: android_unity path: android_unity/*.zip diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index f7a4b83a..11db28f6 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -109,7 +109,7 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ios_unity path: ios_unity/*.zip diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 45970688..9a602c25 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -117,13 +117,13 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux_unity path: linux_unity/*Linux.zip - name: Upload Documentation Sources - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: documentation_sources path: linux_unity/documentation_sources.zip diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index abbe0236..798365ab 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -132,7 +132,7 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos_unity path: macos_unity/*.zip diff --git a/.github/workflows/build_tvos.yml b/.github/workflows/build_tvos.yml index 9d547be1..9706dd8a 100644 --- a/.github/workflows/build_tvos.yml +++ b/.github/workflows/build_tvos.yml @@ -130,7 +130,7 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tvos_unity path: tvos_unity/*.zip diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 77bc8d53..c7143af7 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -129,7 +129,7 @@ jobs: fi - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows_unity path: windows_unity/*.zip diff --git a/.github/workflows/generate_swig.yml b/.github/workflows/generate_swig.yml index 6a63af3f..e1e3de81 100644 --- a/.github/workflows/generate_swig.yml +++ b/.github/workflows/generate_swig.yml @@ -92,7 +92,7 @@ jobs: fi - name: Upload Documentation Sources - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: documentation_sources path: linux_unity/documentation_sources.zip diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index b3900f25..8178b664 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -224,11 +224,11 @@ jobs: --output ~/.android/debug.keystore "scripts/gha-encrypted/debug_keystore.gpg" - name: Fetch prebuilt packaged SDK from previous run if: ${{ github.event.inputs.packaged_sdk_run_id != '' }} - uses: dawidd6/action-download-artifact@v2 + uses: actions/download-artifact@v4 with: name: 'firebase_unity_sdk.zip' - workflow: 'build_starter.yml' - run_id: ${{ github.event.inputs.packaged_sdk_run_id }} + github-token: ${{ github.token }} + run-id: ${{ github.event.inputs.packaged_sdk_run_id }} - name: Build integration tests timeout-minutes: 240 @@ -267,14 +267,14 @@ jobs: echo "__SUMMARY_MISSING__" > build-results-${{ steps.matrix_info.outputs.info }}.log.json fi - name: Upload build results artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: - name: build_and_test_results + name: build_and_test_results-${{ matrix.platform }}-${{ matrix.ios_sdk }} path: build-results-${{ steps.matrix_info.outputs.info }}* retention-days: ${{ env.artifactRetentionDays }} - name: Upload Mobile integration tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ contains('Android,iOS,tvOS', matrix.platform) && !cancelled() }} with: name: testapps-${{ matrix.platform }}-${{ steps.matrix_info.outputs.artifact_suffix }} @@ -285,14 +285,14 @@ jobs: shell: bash run: rm -rf testapps-${{ steps.matrix_info.outputs.info }} || true - name: Upload Desktop build logs artifact # Mobile build logs are uploaded with integration tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ !contains('Android,iOS,tvOS', matrix.platform) && !cancelled() }} with: name: testapps-build-logs-${{ steps.matrix_info.outputs.info }} path: testapps-${{ steps.matrix_info.outputs.info }}/build-logs retention-days: ${{ env.artifactRetentionDays }} - name: Upload Linux integration tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ contains(matrix.platform, 'Linux') && !cancelled() }} with: name: testapps-Linux-${{ steps.matrix_info.outputs.artifact_suffix }} @@ -303,7 +303,7 @@ jobs: shell: bash run: rm -rf testapps-${{ steps.matrix_info.outputs.info }}/Linux || true - name: Upload macOS integration tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ contains(matrix.platform, 'macOS') && !cancelled() }} with: name: testapps-macOS-${{ steps.matrix_info.outputs.artifact_suffix }} @@ -314,7 +314,7 @@ jobs: shell: bash run: rm -rf testapps-${{ steps.matrix_info.outputs.info }}/macOS || true - name: Upload Windows integration tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ contains(matrix.platform, 'Windows') && !cancelled() }} with: name: testapps-Windows-${{ steps.matrix_info.outputs.artifact_suffix }} @@ -326,10 +326,10 @@ jobs: run: rm -rf testapps-${{ steps.matrix_info.outputs.info }}/Windows || true - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: test_results - name: build_and_test_results + name: build_and_test_results-${{ matrix.platform }}-${{ matrix.ios_sdk }} - name: Update PR label and comment if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} shell: bash @@ -388,11 +388,11 @@ jobs: python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" - name: Fetch prebuilt packaged SDK from previous run if: ${{ github.event.inputs.packaged_sdk_run_id != '' }} - uses: dawidd6/action-download-artifact@v2 + uses: actions/download-artifact@v4 with: name: 'firebase_unity_sdk.zip' - workflow: 'build_starter.yml' - run_id: ${{ github.event.inputs.packaged_sdk_run_id }} + github-token: ${{ github.token }} + run-id: ${{ github.event.inputs.packaged_sdk_run_id }} - name: Set up Node (18) uses: actions/setup-node@v3 with: @@ -445,10 +445,10 @@ jobs: echo "__SUMMARY_MISSING__" > test-results-${{ steps.matrix_info.outputs.info }}.log.json fi - name: Upload test results artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: - name: build_and_test_results + name: build_and_test_results-Playmode path: test-results-${{ steps.matrix_info.outputs.info }}* retention-days: ${{ env.artifactRetentionDays }} - name: Update PR label and comment @@ -501,7 +501,7 @@ jobs: if: runner.os == 'macOS' run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer - name: Download Testapp artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: testapps name: ${{ steps.matrix_info.outputs.artifact_path }} @@ -603,17 +603,17 @@ jobs: fi - name: Upload test results artifact if: ${{ !cancelled() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: build_and_test_results + name: build_and_test_results-${{ matrix.platform }}-${{ matrix.test_device }} path: testapps/test-results-${{ steps.matrix_info.outputs.info }}* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - path: test_results - name: build_and_test_results + path: build_and_test_results + name: build_and_test_results-${{ matrix.platform }}-${{ matrix.test_device }} - name: Update PR label and comment shell: bash if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} @@ -649,10 +649,11 @@ jobs: - name: Install python deps run: pip install -r scripts/gha/requirements.txt - name: Download log artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: test_results - name: build_and_test_results + pattern: build_and_test_results-* + merge-multiple: true # Use a different token to remove the "in-progress" label, # to allow the removal to trigger the "Check Labels" workflow. - name: Generate token for GitHub API diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1d8ef5f9..a6dd7b44 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -136,7 +136,7 @@ jobs: # If called by build_start.xml, ignore name search, just grab all artifact exists - name: Fetch All in build_starter - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: built_artifact @@ -224,7 +224,7 @@ jobs: echo "::warning ::$(cat firebase_unity_sdk_hash.txt)" - name: Upload Build unitypackage - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firebase_unity_sdk.zip path: firebase_unity_sdk.zip @@ -253,13 +253,13 @@ jobs: - name: Upload Build tgz if: ${{ steps.check-input.outputs.package_for_checks }} == '1' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firebase_unity_sdk_tgz path: output_tgz - name: upload hash - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: firebase_unity_sdk_hash.txt path: firebase_unity_sdk_hash.txt