Commit 712c897
ci: fix pipeline failing on duplicate NuGet package push (#269)
Re-runs of the CI workflow on the same commit/tag produce the same
effective NuGet version because NuGet ignores SemVer build metadata
(`+N`) when comparing versions, causing a 409 Conflict on the second
push.
## Changes
- **`--skip-duplicate`** added to `dotnet nuget push` in `ci.yml` —
silently skips already-published versions instead of failing
- **`MINVERBUILDMETADATA` syntax fixed** — changed
`build.$GITHUB_RUN_ATTEMPT` (unexpanded shell variable reference) to
`build.${{ github.run_attempt }}` (valid GitHub Actions expression)
```yaml
# Before
MINVERBUILDMETADATA: build.$GITHUB_RUN_ATTEMPT
run: dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
# After
MINVERBUILDMETADATA: build.${{ github.run_attempt }}
run: dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
```
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/alistar-dev/FluentEmail.Graph/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DavidDeSloovere <352626+DavidDeSloovere@users.noreply.github.com>1 parent e21b3a3 commit 712c897
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
0 commit comments