Skip to content

Commit d931992

Browse files
fix(cd): add SymbolPackageFormat=snupkg and safe glob for release assets
- dotnet pack without SymbolPackageFormat=snupkg produces .symbols.nupkg, not .snupkg - Use nullglob so the release create doesn't fail if a glob matches nothing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b3d68e2 commit d931992

4 files changed

Lines changed: 25 additions & 4 deletions

File tree

.actrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# act configuration for local workflow testing.
2+
# See: https://nektosact.com/usage/index.html
3+
4+
# Use full Ubuntu image (has dotnet, node, bun, gh CLI pre-installed)
5+
-P ubuntu-latest=catthehacker/ubuntu:full-latest
6+
7+
# Load secrets from local .secrets file (never commit this file)
8+
--secret-file .secrets
9+
10+
# Load env vars for act-specific overrides
11+
--env-file .env.act

.github/workflows/cd.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,18 @@ jobs:
142142
PRERELEASE_FLAG="--prerelease"
143143
fi
144144
145-
# Create as draft first — draft releases are never immutable, so assets
146-
# can be freely attached. The release becomes immutable only after --draft=false.
145+
# *.nupkg matches both the main package and *.symbols.nupkg.
146+
# nullglob prevents failures if either pattern matches nothing.
147+
shopt -s nullglob
148+
ASSETS=( ./artifacts/nuget/*.nupkg )
149+
shopt -u nullglob
150+
147151
gh release create "${RELEASE_TAG}" \
148152
--draft \
149153
--title "${RELEASE_TAG}" \
150154
--generate-notes \
151155
${PRERELEASE_FLAG} \
152-
./artifacts/nuget/*.nupkg \
153-
./artifacts/nuget/*.snupkg
156+
"${ASSETS[@]}"
154157
155158
# Publish: marks as latest and becomes immutable. Any retry will clean up above.
156159
gh release edit "${RELEASE_TAG}" \

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,7 @@ node_modules/
197197

198198
# BenchmarkDotNet output
199199
BenchmarkDotNet.Artifacts/!scripts/*
200+
201+
# act local secrets
202+
.secrets
203+
.env.act

.secrets.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Template — copy to .secrets (gitignored) and fill in values.
2+
# Used by act for local workflow testing.
3+
GITHUB_TOKEN=<your-pat-with-contents:write-and-packages:write>

0 commit comments

Comments
 (0)