Skip to content

Commit 0314ccb

Browse files
ANcpLuaclaude
andcommitted
ci(publish): future-proof Must-Publish gate + ship BitNet 1.4.10
Two coupled fixes to land ANcpLua.Agents.Hosting.BitNet on nuget.org: 1. Must-Publish gate now also considers `.github/workflows/nuget-publish.yml` in its diff filter and supports a `force_publish` workflow_dispatch input. Rationale: v1.4.9 shipped without BitNet because the previous pack step simply lacked the line — and the follow-up `0a0b637` fix that *added* the line couldn't itself publish, because the gate only looked at src/** and tests/**. A change to publish-workflow IS a release-relevant change when it controls which packages get packed. Without this fix, any future "I missed packing package X" recovery hits the same trap. 2. Add `<PackageReleaseNotes>` to the BitNet csproj — a real src change that clears the gate on this commit and gives consumers a meaningful note about the auto-Docker fixture and LegacyMaxTokensPolicy shim. Verified locally: `dotnet pack -p:Version=1.4.10-alpha.1` produces a valid nupkg containing the nuspec, README.md, and the bundled analyzers/dotnet/cs/ANcpLua.Agents.Hosting.BitNet.Generators.dll (286 KB) — same shape as Hosting.OpenAI's published alpha artifacts. Unblocks #143 (SDK variant) and #330 (qyl.loom wire-up) in clean CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2f0f882 commit 0314ccb

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/nuget-publish.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
version:
1111
description: 'Version override (without v prefix). Leave empty to auto-bump from latest tag.'
1212
required: false
13+
force_publish:
14+
description: 'Force publish even when the Must-Publish gate sees no src/tests/publish-workflow changes.'
15+
required: false
16+
type: boolean
17+
default: false
1318

1419
concurrency:
1520
group: ci-${{ github.ref }}
@@ -152,21 +157,31 @@ jobs:
152157
fetch-depth: 0
153158
fetch-tags: true
154159

160+
# Publish only when there are real release-relevant changes since LATEST_TAG. "Release-
161+
# relevant" is anything under src/** or tests/**, OR the publish workflow file itself
162+
# (because that file controls *which* packages get packed — a missing-pack-line fix is a
163+
# legitimate publish trigger, as PR #80 → v1.4.9 demonstrated when BitNet was silently
164+
# dropped from the artifact bundle).
155165
- name: Must Publish Packages
156166
id: has_changes
157167
run: |
168+
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ github.event.inputs.force_publish }}" == "true" ]; then
169+
echo "Workflow dispatch with force_publish=true — bypassing gate"
170+
echo "has_changes=true" >> $GITHUB_OUTPUT
171+
exit 0
172+
fi
158173
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
159174
if [ -z "$LATEST_TAG" ]; then
160175
echo "No previous tag — first publish, proceeding"
161176
echo "has_changes=true" >> $GITHUB_OUTPUT
162177
else
163-
CHANGES=$(git diff --name-only "$LATEST_TAG" HEAD -- 'src/**' 'tests/**' || true)
178+
CHANGES=$(git diff --name-only "$LATEST_TAG" HEAD -- 'src/**' 'tests/**' '.github/workflows/nuget-publish.yml' || true)
164179
if [ -n "$CHANGES" ]; then
165180
echo "Changes since $LATEST_TAG:"
166181
echo "$CHANGES"
167182
echo "has_changes=true" >> $GITHUB_OUTPUT
168183
else
169-
echo "No src/ or tests/ changes since $LATEST_TAG — skipping publish"
184+
echo "No src/, tests/, or publish-workflow changes since $LATEST_TAG — skipping publish"
170185
echo "has_changes=false" >> $GITHUB_OUTPUT
171186
fi
172187
fi

src/ANcpLua.Agents.Hosting.BitNet/ANcpLua.Agents.Hosting.BitNet.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<RootNamespace>ANcpLua.Agents.Hosting.BitNet</RootNamespace>
44
<PackageId>ANcpLua.Agents.Hosting.BitNet</PackageId>
55
<Description>Alpha-channel BitNet (bitnet.cpp llama-server) hosting facades for Microsoft Agent Framework consumers. Reads the OpenAI-compatible /v1 surface exposed by bitnet.cpp and registers a keyed IChatClient, health-check, and legacy-max-tokens shim. Bundles a Roslyn source generator that auto-wires [assembly: QylBitNetEndpoint] attributes.</Description>
6+
<PackageReleaseNotes>First publish to nuget.org. Pairs with ANcpLua.Agents.Testing's BitNetFixture which auto-manages Microsoft's prebuilt bitnet.cpp Docker image (digest-pinned) when BITNET_URL is unset and Docker is on PATH. Includes the LegacyMaxTokensPolicy shim for llama-server builds pre-ggml-org/llama.cpp#19831.</PackageReleaseNotes>
67
<PackageReadmeFile>README.md</PackageReadmeFile>
78
<PackageTags>maf;agents;microsoft-agents;bitnet;llama-cpp;local-llm;hosting;alpha</PackageTags>
89
<!-- Mirrors upstream MAF + Microsoft.Extensions.AI experimental API diagnostics; keep confined to this alpha hosting package. -->

0 commit comments

Comments
 (0)