Skip to content

Commit 5bfbd9d

Browse files
authored
Revert "ci: use envs in GHAs and pin versions (#2178)"
This reverts commit 11b9e4d.
1 parent 11b9e4d commit 5bfbd9d

12 files changed

+109
-130
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ env:
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 }}
1613

1714
defaults:
1815
run:
@@ -24,19 +21,19 @@ jobs:
2421
runs-on: ubuntu-22.04
2522
steps:
2623
- name: Checkout
27-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
24+
uses: actions/checkout@v3
2825

2926
- name: Checkout submodules
3027
run: git submodule update --init --recursive src/sentry-dotnet
3128

3229
- name: Load env
3330
id: env
34-
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${env:UNITY_VERSION}")" >> $env:GITHUB_OUTPUT
31+
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ inputs.unity-version }}")" >> $env:GITHUB_OUTPUT
3532

3633
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
3734

3835
- name: Restore Unity Packages
39-
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
36+
uses: actions/cache@v3
4037
with:
4138
path: |
4239
samples/unity-of-bugs/Library/Packages
@@ -47,41 +44,41 @@ jobs:
4744
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
4845
with:
4946
registry: ghcr.io
50-
username: ${{ env.GITHUB_ACTOR }}
51-
password: ${{ secrets.GITHUB_TOKEN }}
47+
username: ${{ github.actor }}
48+
password: ${{ secrets.GITHUB_TOKEN }}
5249

5350
- name: Start the Unity docker container
54-
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
51+
run: ./scripts/ci-docker.sh '${{ inputs.unity-version }}' 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
5552
shell: bash
5653

5754
- name: Install .NET SDK
5855
if: runner.os != 'Windows'
59-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
56+
uses: actions/setup-dotnet@v4
6057
with:
6158
global-json-file: src/sentry-dotnet/global.json
6259

6360
- name: Install Android dotnet workflow
64-
run: dotnet workload install android --temp-dir "${env:RUNNER_TEMP}"
61+
run: dotnet workload install android --temp-dir "${{ runner.temp }}"
6562

6663
- name: Download CLI
6764
run: ./scripts/download-sentry-cli.ps1
6865

6966
- name: Download Android SDK
70-
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
67+
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
7168
with:
7269
name: Android-sdk
7370
path: package-dev/Plugins/Android
7471
wait-timeout: 3600
7572

7673
- name: Download Linux SDK
77-
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
74+
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
7875
with:
7976
name: Linux-sdk
8077
path: package-dev/Plugins/Linux
8178
wait-timeout: 3600
8279

8380
- name: Download Windows SDK
84-
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
81+
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
8582
with:
8683
name: Windows-sdk
8784
path: package-dev/Plugins/Windows
@@ -100,16 +97,16 @@ jobs:
10097
run: docker exec unity /home/gh/.dotnet/tools/assemblyalias --target-directory "package-dev/Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*"
10198

10299
- name: Package for release
103-
if: ${{ env.UNITY_VERSION == env.LOWEST_SUPPORTED_UNITY_VERSION }}
100+
if: ${{ inputs.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }}
104101
run: |
105102
docker exec unity dotnet msbuild /t:UnityConfigureSentryOptions /p:Configuration=Release /p:OutDir=other src/Sentry.Unity
106103
./scripts/pack.ps1
107104
108105
- name: Upload release artifacts
109-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
110-
if: ${{ env.UNITY_VERSION == env.LOWEST_SUPPORTED_UNITY_VERSION }}
106+
uses: actions/upload-artifact@v4
107+
if: ${{ inputs.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }}
111108
with:
112-
name: ${{ env.GITHUB_SHA }}
109+
name: ${{ github.sha }}
113110
if-no-files-found: error
114111
path: |
115112
package-release.zip
@@ -120,16 +117,16 @@ jobs:
120117
docker exec unity dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests
121118
122119
- name: Upload test artifacts (playmode)
123-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
120+
uses: actions/upload-artifact@v4
124121
with:
125-
name: Test results (playmode) - ${{ env.UNITY_VERSION }}
122+
name: Test results (playmode) - ${{inputs.unity-version}}
126123
path: artifacts/test/playmode
127124

128125
- name: Run Unity tests (editmode)
129126
run: docker exec unity dotnet msbuild /t:UnityEditModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Editor.Tests
130127

131128
- name: Upload test artifacts (editmode)
132-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
129+
uses: actions/upload-artifact@v4
133130
with:
134-
name: Test results (editmode) - ${{ env.UNITY_VERSION }}
131+
name: Test results (editmode) - ${{inputs.unity-version}}
135132
path: artifacts/test/editmode

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
uses: actions/checkout@v3
6868

6969
- name: Download UPM package
70-
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
70+
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
7171
with:
7272
name: ${{ github.sha }}
7373
wait-timeout: 3600
@@ -118,7 +118,7 @@ jobs:
118118
uses: actions/checkout@v3
119119

120120
- name: Free Disk Space (Ubuntu)
121-
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8 # v1.3.0
121+
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
122122
with:
123123
android: true
124124
dotnet: false
@@ -149,18 +149,18 @@ jobs:
149149
docker exec --user root unity apt-get -y -q install mono-devel
150150
151151
- name: Download IntegrationTest project
152-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
152+
uses: actions/download-artifact@v4
153153
with:
154154
name: smoke-test-${{ matrix.unity-version }}
155155

156156
- name: Extract project archive
157157
run: tar -xvzf test-project.tar.gz
158158

159159
# - name: Build without Sentry SDK
160-
# run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${env:UNITY_PATH}" -Platform "${{ matrix.platform }}"
160+
# run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform "${{ matrix.platform }}"
161161

162162
- name: Download UPM package
163-
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
163+
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848
164164
with:
165165
name: ${{ github.sha }}
166166
wait-timeout: 3600
@@ -187,7 +187,7 @@ jobs:
187187
188188
# Upload runtime initialization build
189189
- name: Upload test app
190-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
190+
uses: actions/upload-artifact@v4
191191
with:
192192
name: testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-runtime
193193
if-no-files-found: error
@@ -196,7 +196,7 @@ jobs:
196196

197197
- name: Upload IntegrationTest project on failure
198198
if: ${{ failure() }}
199-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
199+
uses: actions/upload-artifact@v4
200200
with:
201201
name: failed-project-${{ matrix.platform }}-${{ matrix.unity-version }}
202202
path: |
@@ -302,7 +302,7 @@ jobs:
302302
uses: actions/checkout@v3
303303

304304
- name: Download test app artifact
305-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
305+
uses: actions/download-artifact@v4
306306
id: download
307307
with:
308308
name: testapp-${{ matrix.platform }}-${{ matrix.unity-version }}-runtime
@@ -345,7 +345,7 @@ jobs:
345345
# unity-config-path: /Library/Application Support/Unity/config/
346346
steps:
347347
- name: Checkout
348-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
348+
uses: actions/checkout@v3
349349

350350
- name: Load env
351351
id: env
@@ -365,18 +365,18 @@ jobs:
365365
Set-Content -Path '${{ matrix.unity-config-path }}services-config.json' -Value '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
366366
367367
- name: Download IntegrationTest project
368-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
368+
uses: actions/download-artifact@v4
369369
with:
370370
name: smoke-test-${{ matrix.unity-version }}
371371

372372
- name: Extract project archive
373373
run: tar -xvzf test-project.tar.gz
374374

375375
- name: Build without Sentry SDK
376-
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${env:UNITY_PATH}"
376+
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}"
377377

378378
- name: Download UPM package
379-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
379+
uses: actions/download-artifact@v4
380380
with:
381381
name: ${{ github.sha }}
382382

.github/workflows/format-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
11+
uses: actions/checkout@v3
1212
with:
1313
submodules: recursive
1414

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2626

2727
- name: Check out current commit (${{ github.sha }})
28-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
28+
uses: actions/checkout@v3
2929
with:
3030
token: ${{ steps.token.outputs.token }}
3131
fetch-depth: 0
3232

3333
- name: Prepare release ${{ github.event.inputs.version }}
34-
uses: getsentry/action-prepare-release@3cea80dc3938c0baf5ec4ce752ecb311f8780cdc # v1
34+
uses: getsentry/action-prepare-release@v1
3535
env:
3636
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3737
with:

.github/workflows/sdk.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,15 @@ on:
1616
env:
1717
DOTNET_CLI_TELEMETRY_OPTOUT: 1
1818
DOTNET_NOLOGO: 1
19-
TARGET: ${{ inputs.target }}
20-
CONTAINER: ${{ inputs.container }}
21-
RUNS_ON: ${{ inputs.runsOn }}
2219

2320
jobs:
2421
build:
25-
runs-on: ${{ env.RUNS_ON }}
26-
container: ${{ env.CONTAINER }}
22+
runs-on: ${{ inputs.runsOn }}
23+
container: ${{ inputs.container }}
2724
timeout-minutes: 30
2825
steps:
2926
- name: Set up Git in container
30-
if: ${{ env.CONTAINER != '' }}
27+
if: ${{ inputs.container != '' }}
3128
# ubuntu:20.04 does not have git installed by default. Make it available
3229
# for actions/checkout to get a proper clone instead of downloading a
3330
# tarball using the GitHub REST API. This ensures that git submodule
@@ -43,13 +40,13 @@ jobs:
4340
env:
4441
DEBIAN_FRONTEND: noninteractive
4542

46-
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
43+
- uses: actions/checkout@v3
4744

4845
- name: Select submodules
4946
id: env
5047
shell: bash
5148
run: |
52-
if [[ "${TARGET}" == "Android" ]]; then
49+
if [[ "${{ inputs.target }}" == "Android" ]]; then
5350
submodules="modules/sentry-java"
5451
else
5552
submodules="modules/sentry-native"
@@ -61,22 +58,22 @@ jobs:
6158
- name: Get submodule status
6259
run: git submodule status --cached ${{ steps.env.outputs.submodules }} | tee submodules-status
6360

64-
- run: cp -r package-dev/Plugins/${TARGET} sdk-static || echo "never mind, no files checked in..."
61+
- run: cp -r package-dev/Plugins/${{ inputs.target }} sdk-static || echo "never mind, no files checked in..."
6562
shell: bash
6663

6764
- name: Restore from cache
68-
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
65+
uses: actions/cache@v3
6966
id: cache
7067
with:
7168
# Note: native SDKs are cached and only built if the respective 'package-dev/Plugins/' directories are empty.
7269
# Output changes only depending on the git sha of the submodules
7370
# hash of package/package.json for cache busting on release builds (version bump)
7471
path: |
7572
package-dev/Plugins
76-
key: sdk=${{ env.TARGET }}-${{ hashFiles('submodules-status', 'package/package.json', 'Directory.Build.targets', 'sdk-static/**') }}
73+
key: sdk=${{ inputs.target }}-${{ hashFiles('submodules-status', 'package/package.json', 'Directory.Build.targets', 'sdk-static/**') }}
7774

7875
- name: Installing Linux Dependencies
79-
if: ${{ env.TARGET == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
76+
if: ${{ inputs.target == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
8077
shell: bash
8178
run: |
8279
apt-get update
@@ -91,19 +88,19 @@ jobs:
9188
if: steps.cache.outputs.cache-hit != 'true'
9289
run: |
9390
git submodule update --init --recursive ${{ steps.env.outputs.submodules }}
94-
dotnet msbuild /t:Build${TARGET}SDK /p:Configuration=Release /p:OutDir=other src/Sentry.Unity
91+
dotnet msbuild /t:Build${{ inputs.target }}SDK /p:Configuration=Release /p:OutDir=other src/Sentry.Unity
9592
9693
- name: Upload build logs on failure
9794
if: ${{ failure() }}
98-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
95+
uses: actions/upload-artifact@v4
9996
with:
10097
path: ${{ steps.env.outputs.submodulesPath }}/build.log
10198
# Lower retention period - we only need this to retry CI.
10299
retention-days: 14
103100

104-
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
101+
- uses: actions/upload-artifact@v4
105102
with:
106-
name: ${{ env.TARGET }}-sdk
107-
path: package-dev/Plugins/${{ env.TARGET }}
103+
name: ${{ inputs.target }}-sdk
104+
path: package-dev/Plugins/${{ inputs.target }}
108105
# Lower retention period - we only need this to retry CI.
109106
retention-days: 14

0 commit comments

Comments
 (0)