Skip to content

Commit 4ee795e

Browse files
authored
fix: prepare first release publication (#46)
1 parent fd04d57 commit 4ee795e

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,21 @@ jobs:
132132
- name: Push to NuGet
133133
env:
134134
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
135-
run: dotnet nuget push 'release/*.nupkg' --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
135+
run: |
136+
if [ -z "$NUGET_API_KEY" ]; then
137+
echo '::error::Configure the NUGET_API_KEY Actions secret before publishing.'
138+
exit 1
139+
fi
140+
dotnet nuget push 'release/*.nupkg' --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
136141
- name: Create GitHub release
137142
env:
138143
GH_TOKEN: ${{ github.token }}
144+
GH_REPO: ${{ github.repository }}
139145
RELEASE_TAG: ${{ github.ref_name }}
140-
run: gh release create "$RELEASE_TAG" release/* --verify-tag --generate-notes --title "$RELEASE_TAG"
146+
RELEASE_VERSION: ${{ needs.validate.outputs.version }}
147+
run: |
148+
flags=()
149+
if [[ "$RELEASE_VERSION" == *-* ]]; then
150+
flags+=(--prerelease --latest=false)
151+
fi
152+
gh release create "$RELEASE_TAG" release/* --verify-tag --generate-notes --title "$RELEASE_TAG" "${flags[@]}"

‎docs/binary-distribution.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ pwsh -File .github/scripts/Test-Binary.ps1 -Runtime osx-arm64 -Version 0.1.0-pre
3535
Smoke tests validate the checksum and three-file archive, unpack into a clean directory, start `version` with an empty PATH and isolated runtime roots, run offline non-.NET commands and SQLite index state, then launch the relocated executable from real SDK MCP clients. Those clients exercise read-only denials, semantic evaluation, reversible rename, and actual build/TRX test results. The installed SDK is used only for the SDK-dependent acceptance portion.
3636

3737
The release workflow validates build, tests, scenarios, documentation, dependency audit, and local NuGet installation before binary jobs. NuGet push and GitHub release assembly wait for all six native smoke jobs. Local success does not prove the other platform jobs have run. No release is created until a version tag triggers the gated workflow.
38+
39+
Before pushing the first version tag, configure the `NUGET_API_KEY` Actions secret at repository scope or in the `nuget` environment with permission to publish all `SharpClaw.Code*` packages. A missing key fails publication with an explicit error after artifact validation. After configuring the key, rerun failed jobs on the same tagged workflow to retain the validated artifacts. Tags with prerelease versions, such as `v0.1.0-preview.1`, create GitHub prereleases.

0 commit comments

Comments
 (0)