Skip to content

Commit 6d3c7c3

Browse files
Add Expose GitHub Actions Runtime step before test runs for TUnit artifact upload
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
1 parent 9e6a44d commit 6d3c7c3

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/Build-Test-And-Deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
- name: Build with dotnet
4444
run: dotnet build -p:ContinuousIntegrationBuild=True -p:ReleaseDateAttribute=True --configuration Release --no-restore
4545

46+
- name: Expose GitHub Actions Runtime
47+
uses: actions/github-script@v7
48+
with:
49+
script: |
50+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
51+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
52+
4653
- name: Run .NET Tests
4754
run: dotnet test --no-build --configuration Release
4855

.github/workflows/PR-Build-And-Test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
- name: Build with dotnet
3535
run: dotnet build --configuration Release --no-restore /p:AccessToNugetFeed=false
3636

37+
- name: Expose GitHub Actions Runtime
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
42+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
43+
3744
- name: Run .NET Tests
3845
run: dotnet test --no-build --configuration Release --report-trx --coverage --results-directory ${{ runner.temp }}
3946

0 commit comments

Comments
 (0)