Skip to content

Commit

Permalink
Update publish_nuget.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongph87 authored Jan 28, 2024
1 parent fbe8a90 commit 71c27fc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
create_nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
with:
dotnet-version: '6.0.x'
- run: dotnet pack --configuration Release --output ${{env.NuGetDirectory}}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
Expand Down Expand Up @@ -53,10 +53,10 @@ jobs:
run_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
with:
dotnet-version: '6.0.x'
- name: Run tests
run: dotnet test --configuration Release
Expand All @@ -77,10 +77,10 @@ jobs:
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
with:
dotnet-version: '6.0.x'
- name: Publish NuGet package
run: |
foreach($file in (Get-ChildItem "${{env.NuGetDirectory}}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY}}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
}

0 comments on commit 71c27fc

Please sign in to comment.