1010 LOWEST_SUPPORTED_UNITY_VERSION : 2019
1111 DOTNET_CLI_TELEMETRY_OPTOUT : 1
1212 DOTNET_NOLOGO : 1
13+ GITHUB_ACTOR : ${{ github.actor }}
14+ GITHUB_SHA : ${{ github.sha }}
15+ UNITY_VERSION : ${{ inputs.unity-version }}
1316
1417defaults :
1518 run :
@@ -21,19 +24,19 @@ jobs:
2124 runs-on : ubuntu-22.04
2225 steps :
2326 - name : Checkout
24- uses : actions/checkout@v3
27+ uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2528
2629 - name : Checkout submodules
2730 run : git submodule update --init --recursive src/sentry-dotnet
2831
2932 - name : Load env
3033 id : env
31- run : echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ inputs.unity-version } }")" >> $env:GITHUB_OUTPUT
34+ run : echo "unityVersion=$(./scripts/ci-env.ps1 "unity${env:UNITY_VERSION }")" >> $env:GITHUB_OUTPUT
3235
3336 - run : echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
3437
3538 - name : Restore Unity Packages
36- uses : actions/cache@v3
39+ uses : actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
3740 with :
3841 path : |
3942 samples/unity-of-bugs/Library/Packages
@@ -44,41 +47,41 @@ jobs:
4447 uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
4548 with :
4649 registry : ghcr.io
47- username : ${{ github.actor }}
48- password : ${{ secrets.GITHUB_TOKEN }}
50+ username : ${{ env.GITHUB_ACTOR }}
51+ password : ${{ secrets.GITHUB_TOKEN }}
4952
5053 - name : Start the Unity docker container
51- run : ./scripts/ci-docker.sh '${{ inputs.unity-version }}' 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
54+ run : ./scripts/ci-docker.sh "${UNITY_VERSION}" 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
5255 shell : bash
5356
5457 - name : Install .NET SDK
5558 if : runner.os != 'Windows'
56- uses : actions/setup-dotnet@v4
59+ uses : actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
5760 with :
5861 global-json-file : src/sentry-dotnet/global.json
5962
6063 - name : Install Android dotnet workflow
61- run : dotnet workload install android --temp-dir "${{ runner.temp } }"
64+ run : dotnet workload install android --temp-dir "${env:RUNNER_TEMP }"
6265
6366 - name : Download CLI
6467 run : ./scripts/download-sentry-cli.ps1
6568
6669 - name : Download Android SDK
67- uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
70+ uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
6871 with :
6972 name : Android-sdk
7073 path : package-dev/Plugins/Android
7174 wait-timeout : 3600
7275
7376 - name : Download Linux SDK
74- uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
77+ uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
7578 with :
7679 name : Linux-sdk
7780 path : package-dev/Plugins/Linux
7881 wait-timeout : 3600
7982
8083 - name : Download Windows SDK
81- uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
84+ uses : vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
8285 with :
8386 name : Windows-sdk
8487 path : package-dev/Plugins/Windows
@@ -97,16 +100,16 @@ jobs:
97100 run : docker exec unity /home/gh/.dotnet/tools/assemblyalias --target-directory "package-dev/Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*"
98101
99102 - name : Package for release
100- if : ${{ inputs.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }}
103+ if : ${{ env.UNITY_VERSION == env.LOWEST_SUPPORTED_UNITY_VERSION }}
101104 run : |
102105 docker exec unity dotnet msbuild /t:UnityConfigureSentryOptions /p:Configuration=Release /p:OutDir=other src/Sentry.Unity
103106 ./scripts/pack.ps1
104107
105108 - name : Upload release artifacts
106- uses : actions/upload-artifact@v4
107- if : ${{ inputs.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }}
109+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
110+ if : ${{ env.UNITY_VERSION == env.LOWEST_SUPPORTED_UNITY_VERSION }}
108111 with :
109- name : ${{ github.sha }}
112+ name : ${{ env.GITHUB_SHA }}
110113 if-no-files-found : error
111114 path : |
112115 package-release.zip
@@ -117,16 +120,16 @@ jobs:
117120 docker exec unity dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests
118121
119122 - name : Upload test artifacts (playmode)
120- uses : actions/upload-artifact@v4
123+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
121124 with :
122- name : Test results (playmode) - ${{inputs.unity-version }}
125+ name : Test results (playmode) - ${{ env.UNITY_VERSION }}
123126 path : artifacts/test/playmode
124127
125128 - name : Run Unity tests (editmode)
126129 run : docker exec unity dotnet msbuild /t:UnityEditModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Editor.Tests
127130
128131 - name : Upload test artifacts (editmode)
129- uses : actions/upload-artifact@v4
132+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
130133 with :
131- name : Test results (editmode) - ${{inputs.unity-version }}
134+ name : Test results (editmode) - ${{ env.UNITY_VERSION }}
132135 path : artifacts/test/editmode
0 commit comments