Skip to content

Commit

Permalink
Update the upload download actions to v4 (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-maurice authored Nov 13, 2024
1 parent b835dda commit 44cd79b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build_tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/generate_swig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
51 changes: 26 additions & 25 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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() }}
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 44cd79b

Please sign in to comment.