Skip to content

Commit

Permalink
Updated nuget configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongph87 committed Jan 28, 2024
1 parent d37895e commit fbe8a90
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- run: dotnet pack --configuration Release --output ${{env.NuGetDirectory}}
- uses: actions/upload-artifact@v3
with:
Expand All @@ -36,9 +38,10 @@ jobs:
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4

with:
dotnet-version: '6.0.x'
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{env.NuGetDirectory}}
Expand All @@ -53,6 +56,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Run tests
run: dotnet test --configuration Release
deploy:
Expand All @@ -64,14 +69,16 @@ jobs:
needs: [validate_nuget, run_test]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{env.NuGetDirectory}}

# Install the .NET SDK indicated in the global.json file
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Publish NuGet package
run: |
foreach($file in (Get-ChildItem "${{env.NuGetDirectory}}" -Recurse -Include *.nupkg)) {
Expand Down

0 comments on commit fbe8a90

Please sign in to comment.