Skip to content

Commit 9bb86da

Browse files
committed
fix(build): skip symbols packages during NuGet publish
Release workflow: - Filter signed publish inputs so legacy *.symbols.nupkg artifacts are not pushed to NuGet as primary packages. - Add --skip-duplicate so reruns after partial publishes continue with remaining packages. Validation: - Simulated the publish package selection with primary and symbols packages. - Ran git diff --check.
1 parent 0feb5d7 commit 9bb86da

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/BuildDeploy.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,29 @@ jobs:
411411
- name: Push to NuGet
412412
shell: bash
413413
run: |
414-
for pkg in ./signed/*.nupkg; do
415-
dotnet nuget push "$pkg" --source https://api.nuget.org/v3/index.json --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}"
414+
set -euo pipefail
415+
shopt -s nullglob
416+
417+
packages=(./signed/*.nupkg)
418+
push_packages=()
419+
for pkg in "${packages[@]}"; do
420+
case "$pkg" in
421+
*.symbols.nupkg)
422+
echo "Skipping legacy symbols package: $pkg"
423+
;;
424+
*)
425+
push_packages+=("$pkg")
426+
;;
427+
esac
428+
done
429+
430+
[ "${#push_packages[@]}" -gt 0 ] || { echo "::error::no publishable packages matched: ./signed/*.nupkg"; exit 1; }
431+
432+
for pkg in "${push_packages[@]}"; do
433+
dotnet nuget push "$pkg" \
434+
--source https://api.nuget.org/v3/index.json \
435+
--api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" \
436+
--skip-duplicate
416437
done
417438
418439
create-release:

0 commit comments

Comments
 (0)