From 795725f0ccbff24a5635cfeaebb18ad641e95ec4 Mon Sep 17 00:00:00 2001 From: Sahara Yousuf Date: Tue, 12 Mar 2024 12:12:40 -0500 Subject: [PATCH] Correct save artifacts step in workflow --- .github/workflows/test-dotnet-samples.yml | 35 ++++++++++++----------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-dotnet-samples.yml b/.github/workflows/test-dotnet-samples.yml index 953bf41..54ba199 100644 --- a/.github/workflows/test-dotnet-samples.yml +++ b/.github/workflows/test-dotnet-samples.yml @@ -159,24 +159,27 @@ jobs: echo "Not available on this os" fi fi - - name: List sample output files + - name: Set output variable + id: set-sample-name + working-directory: ${{matrix.dir}} run: | - ls ${{ github.workspace}}/ + sample_name=$(basename "$PWD") + echo "::set-output name=sample_name::$sample_name" - name: Save artifacts uses: actions/upload-artifact@v4 with: - name: output-${{ runner.os }}-${{matrix.dir}} + name: output-${{ runner.os }}-${{ steps.set-sample-name.outputs.sample_name }} path: | - **.docx - **.xslx - **.pptx - **.pdf - **.tif - **.png - **.jpg - **.eps - **.tiff - **.bmp - **.gif - **.json - **.txt + **/*.docx + **/*.xslx + **/*.pptx + **/*.pdf + **/*.tif + **/*.png + **/*.jpg + **/*.eps + **/*.tiff + **/*.bmp + **/*.gif + **/*.json + **/*.txt