Skip to content

Commit c0a7249

Browse files
committed
build: Use temporary directory for uploads
1 parent e1385d1 commit c0a7249

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/build-test-publish.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ name: Build, Test, Publish
22
on:
33
- push
44

5-
defaults:
6-
run:
7-
working-directory: src
8-
95
jobs:
106
build:
117
name: Build and Test
128
runs-on: [ self-hosted, macos, dotnet ]
139
env:
1410
DOTNET_NOLOGO: true
1511
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
12+
defaults:
13+
run:
14+
working-directory: src
1615

1716
outputs:
1817
is-release: ${{ steps.get-version.outputs.is-release }}
@@ -67,30 +66,32 @@ jobs:
6766
uses: actions/download-artifact@v2
6867
with:
6968
name: test-results
69+
path: ${{runner.temp}}/res
7070

7171
- name: Publish Test Results
7272
uses: enricomi/publish-unit-test-result-action/composite@v1
7373
if: always()
7474
with:
75-
files: '**/test-results.xml'
75+
files: ${{runner.temp}}/res/**/test-results.xml
7676

7777
publish-nuget:
7878
name: Publish NuGet
7979
runs-on: [ self-hosted, macos, dotnet ]
8080
env:
8181
DOTNET_NOLOGO: true
8282
needs: build
83+
8384
steps:
8485
- name: Fetch Package Artifacts
8586
uses: actions/download-artifact@v2
8687
with:
8788
name: packages
88-
path: src
89+
path: ${{runner.temp}}/packages
8990

9091
- name: Publish NuGet Packages
9192
if: needs.build.outputs.is-release == 'true'
92-
run: dotnet nuget push *.nupkg -s nuget.org -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
93+
run: dotnet nuget push ${{runner.temp}}/packages/*.nupkg -s nuget.org -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
9394

9495
- name: Publish GitHub Packages
9596
if: needs.build.outputs.is-release != 'true'
96-
run: dotnet nuget push *.nupkg -s https://${{github.actor}}@nuget.pkg.github.com/${{github.repository_owner}} -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
97+
run: dotnet nuget push ${{runner.temp}}/packages/*.nupkg -s https://${{github.actor}}@nuget.pkg.github.com/${{github.repository_owner}} -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate

0 commit comments

Comments
 (0)