Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# act configuration for local workflow testing.
# See: https://nektosact.com/usage/index.html

# Use full Ubuntu image (has dotnet, node, bun, gh CLI pre-installed)
-P ubuntu-latest=catthehacker/ubuntu:full-latest

# Load secrets from local .secrets file (never commit this file)
--secret-file .secrets

# Load env vars for act-specific overrides
--env-file .env.act
Comment on lines +9 to +11
22 changes: 18 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,29 @@ jobs:
PRERELEASE_FLAG="--prerelease"
fi

# Create as draft first — draft releases are never immutable, so assets
# can be freely attached. The release becomes immutable only after --draft=false.
# Collect assets safely and fail if no package output exists.
shopt -s nullglob
PACKAGES=( ./artifacts/nuget/*.nupkg )
SYMBOLS=( ./artifacts/nuget/*.snupkg )
shopt -u nullglob

if (( ${#PACKAGES[@]} == 0 )); then
echo "::error::No .nupkg package assets found in ./artifacts/nuget."
exit 1
fi

if (( ${#SYMBOLS[@]} == 0 )); then
echo "::warning::No .snupkg symbol assets found in ./artifacts/nuget."
Comment on lines +146 to +157
fi

ASSETS=( "${PACKAGES[@]}" "${SYMBOLS[@]}" )

gh release create "${RELEASE_TAG}" \
--draft \
--title "${RELEASE_TAG}" \
--generate-notes \
${PRERELEASE_FLAG} \
./artifacts/nuget/*.nupkg \
./artifacts/nuget/*.snupkg
"${ASSETS[@]}"

# Publish: marks as latest and becomes immutable. Any retry will clean up above.
gh release edit "${RELEASE_TAG}" \
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,7 @@ node_modules/

# BenchmarkDotNet output
BenchmarkDotNet.Artifacts/!scripts/*

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