Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
icnocop committed Oct 16, 2023
1 parent d6f94b9 commit d14ce37
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
echo SEM_VERSION=${{ env.SEM_VERSION }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4.1.0

- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 2.1

Expand All @@ -63,7 +63,7 @@ jobs:
copy ".\src\AzurePipelines.TestLogger\bin\${{ matrix.Configuration }}\netstandard1.5\*.dll" .\src\AzurePipelines.TestLogger\contentFiles\any\any
- name: Pack
run: dotnet pack .\src\AzurePipelines.TestLogger\AzurePipelines.TestLogger.csproj --configuration ${{ matrix.Configuration }} -p:NuspecProperties="Version=${{ env.SEM_VERSION }}" --no-restore --no-build --output:.\build -p:NuspecFile=AzurePipelines.TestLogger.nuspec
run: dotnet pack .\src\AzurePipelines.TestLogger\AzurePipelines.TestLogger.csproj --configuration ${{ matrix.Configuration }} -p:NuspecProperties="Version=${{ env.SEM_VERSION }}" --no-restore --no-build --output:.\build -p:NuspecFile=..\..\..\src\AzurePipelines.TestLogger\AzurePipelines.TestLogger.nuspec

- name: Test
run: dotnet test --no-build --no-restore --verbosity normal --configuration ${{ matrix.Configuration }}
Expand All @@ -78,7 +78,7 @@ jobs:
tar -cf AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.zip .\AzurePipelines.TestLogger.${{ env.SEM_VERSION }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
with:
name: AzurePipelines.TestLogger ${{ env.SEM_VERSION }} ${{ matrix.Configuration }}
path: AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.zip
Expand All @@ -97,12 +97,12 @@ jobs:
.\src\AzurePipelines.TestLogger\build\AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.nupkg
- name: Upload NuGet Package
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
with:
name: AzurePipelines.TestLogger ${{ env.SEM_VERSION }} ${{ matrix.Configuration }}.nupkg
path: .\src\AzurePipelines.TestLogger\build\AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.nupkg
if-no-files-found: error

- name: Publish NuGet Package
if: ${{ matrix.Configuration == 'Release' && github.event_name != 'pull_request' }}
run: dotnet nuget push .\src\AzurePipelines.TestLogger\build\AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push .\src\AzurePipelines.TestLogger\build\AzurePipelines.TestLogger.${{ env.SEM_VERSION }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit d14ce37

Please sign in to comment.