Skip to content

Commit 3a5e73c

Browse files
Update NuGet publish step in workflow
Refactor NuGet package publishing to use specific version.
1 parent 4ddaf24 commit 3a5e73c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,10 @@ jobs:
142142
- name: Publish to NuGet.org
143143
shell: pwsh
144144
run: |
145-
$packages = Get-ChildItem -Path "${{ github.workspace }}/nupkg" -Filter *.nupkg
146-
foreach ($package in $packages) {
147-
Write-Host "Going to publish $($package.Name)"
148-
dotnet nuget push $package.FullName --api-key ${{ steps.nuget-login.outputs.nuget-api-key }} --source https://api.nuget.org/v3/index.json
149-
if ($LASTEXITCODE -ne 0) {
150-
throw "Failed to publish $($package.Name)"
151-
}
152-
}
145+
$packageVersion = "${{ steps.version.outputs.version }}"
146+
147+
dotnet nuget push ${{ github.workspace }}/nupkg/Infragistics.QueryBuilder.Executor.$packageVersion.nupkg --api-key ${{ steps.nuget-login.outputs.nuget-api-key }} --source https://api.nuget.org/v3/index.json
148+
153149
154150
- name: Clean up certificate
155151
if: always()

0 commit comments

Comments
 (0)