Skip to content

Commit 0cbd92c

Browse files
committed
Pack all NuGet packages in release workflow
1 parent 307678c commit 0cbd92c

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,15 @@ jobs:
7979
- name: Pack NuGet packages
8080
run: |
8181
mkdir -p ./artifacts
82-
dotnet pack CodexSharpSDK/CodexSharpSDK.csproj --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
83-
dotnet pack CodexSharpSDK.Extensions.AgentFramework/CodexSharpSDK.Extensions.AgentFramework.csproj --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
82+
dotnet pack ManagedCode.CodexSharpSDK.slnx --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
8483
8584
- name: Validate packed artifacts
8685
run: |
8786
VERSION="${{ steps.version.outputs.version }}"
8887
AGENT_FRAMEWORK_VERSION="${{ steps.version.outputs.agent_framework_version }}"
88+
find ./artifacts -maxdepth 1 -name '*.nupkg' | sort
8989
test -f "./artifacts/ManagedCode.CodexSharpSDK.$VERSION.nupkg"
90+
test -f "./artifacts/ManagedCode.CodexSharpSDK.Extensions.AI.$VERSION.nupkg"
9091
test -f "./artifacts/ManagedCode.CodexSharpSDK.Extensions.AgentFramework.$AGENT_FRAMEWORK_VERSION.nupkg"
9192
9293
- name: Upload artifacts
@@ -252,8 +253,17 @@ jobs:
252253
echo "" >> release_notes.md
253254
echo "## NuGet Packages" >> release_notes.md
254255
echo "" >> release_notes.md
255-
echo "- [ManagedCode.CodexSharpSDK v$VERSION](https://www.nuget.org/packages/ManagedCode.CodexSharpSDK/$VERSION)" >> release_notes.md
256-
echo "- [ManagedCode.CodexSharpSDK.Extensions.AgentFramework v$AGENT_FRAMEWORK_VERSION](https://www.nuget.org/packages/ManagedCode.CodexSharpSDK.Extensions.AgentFramework/$AGENT_FRAMEWORK_VERSION)" >> release_notes.md
256+
shopt -s nullglob
257+
for package in ./artifacts/*.nupkg; do
258+
base_name=$(basename "$package" .nupkg)
259+
if [[ "$base_name" =~ ^(.+)\.([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?)$ ]]; then
260+
PACKAGE_ID="${BASH_REMATCH[1]}"
261+
PACKAGE_VERSION="${BASH_REMATCH[2]}"
262+
echo "- [$PACKAGE_ID v$PACKAGE_VERSION](https://www.nuget.org/packages/$PACKAGE_ID/$PACKAGE_VERSION)" >> release_notes.md
263+
else
264+
echo "- $base_name" >> release_notes.md
265+
fi
266+
done
257267
258268
echo "" >> release_notes.md
259269
echo "---" >> release_notes.md

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ If no new rule is detected -> do not update the file.
169169
- Solution/workspace file naming must use `ManagedCode.CodexSharpSDK` prefix for consistency with package identity.
170170
- Keep package/version metadata centralized in `Directory.Build.props`; avoid duplicating version structure or release metadata blocks in individual `.csproj` files unless a project-specific override is required.
171171
- Keep shared NuGet package metadata such as `PackageReadmeFile` in global `Directory.Build.props` for packable projects; do not duplicate it in individual `.csproj` files because package presentation must stay consistent across packages.
172+
- Release workflow must pack and publish every packable NuGet package in the repository so optional adapter packages never get omitted from NuGet releases.
172173
- Never hardcode guessed Codex/OpenAI model names in tests, docs, or defaults; verify supported models and active default via Codex CLI first.
173174
- Before setting or changing any `Model` value, read available models and current default from the local `codex` CLI in the same environment/account and only then update code/tests/docs.
174175
- Model identifiers in code/tests must come from centralized constants or a shared resolver helper; do not inline model string literals repeatedly.

docs/Features/release-and-sync-automation.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Keep package quality and upstream Codex CLI parity automatically verified throug
4040
- Release workflow must read package version from `Directory.Build.props`.
4141
- Release workflow must validate semantic version format before packaging.
4242
- Release workflow must fail if the produced core `.nupkg` version does not match `Directory.Build.props`.
43-
- Release workflow must also pack `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` with its project-specific prerelease package version.
43+
- Release workflow must pack every packable NuGet project in the repository, not a hand-maintained subset.
4444
- Release workflow must use generated GitHub release notes.
4545
- Release workflow must create/push git tag `v<version>` before publishing GitHub release.
4646
- Codex CLI watch runs daily and opens issue when upstream `openai/codex` changed since pinned submodule SHA.
@@ -75,8 +75,7 @@ flowchart LR
7575
- `codex features list`
7676
- `dotnet build ManagedCode.CodexSharpSDK.slnx -c Release -warnaserror`
7777
- `dotnet test --solution ManagedCode.CodexSharpSDK.slnx -c Release`
78-
- `dotnet pack CodexSharpSDK/CodexSharpSDK.csproj -c Release --no-build -o artifacts`
79-
- `dotnet pack CodexSharpSDK.Extensions.AgentFramework/CodexSharpSDK.Extensions.AgentFramework.csproj -c Release --no-build -o artifacts`
78+
- `dotnet pack ManagedCode.CodexSharpSDK.slnx -c Release --no-build -o artifacts`
8079

8180
### Workflow mapping
8281

0 commit comments

Comments
 (0)