Summary
AOT publish is configured and works in CI, but there's no local convenience for building native binaries. The release workflow builds artifacts but doesn't create GitHub Releases with downloadable binaries.
What to do
1. Create Makefile at repo root
Convenience Makefile for local builds and AOT publishing. Auto-detects RID from uname.
| Target |
What it does |
make restore |
dotnet restore |
make build |
Debug build (depends on restore) |
make build-release |
Release build |
make test |
Runs all three test projects (unit, integration, smoke) |
make publish |
AOT publish for current platform to publish/<rid>/. Accepts RID=linux-x64 override |
make publish-all |
AOT publish for osx-arm64, linux-x64, win-x64 |
make clean |
rm -rf publish/ + dotnet clean |
Publish command: dotnet publish src/Clet -c Release -r $(RID) --self-contained -p:PublishAot=true -o publish/$(RID)
2. Add release job to .github/workflows/release.yml
Insert a new job after tag and before publish-nuget. Also add release to the notify-failure job's needs array.
- needs:
[resolve-version, build, tag]
- runs-on:
ubuntu-latest
- Steps:
- Download all artifacts via
actions/download-artifact@v4 to artifacts/
- Create archives in
dist/:
- macOS/Linux:
tar -czf dist/clet-<version>-<rid>.tar.gz (after chmod +x clet)
- Windows:
zip -r dist/clet-<version>-win-x64.zip
- Skip missing artifacts with a warning
- Create GitHub Release via
gh release create v<version>:
--title "clet v<version>"
--generate-notes
--prerelease if version contains - (alpha, develop)
- Attach all files from
dist/*
- Uses
GITHUB_TOKEN and github.repository env vars
3. Update CLAUDE.md Build and Test section
- Add
dotnet run --project tests/Clet.SmokeTests --no-build to the test commands
- Add a section documenting the Makefile targets
Verification
make publish
./publish/osx-arm64/clet --version
./publish/osx-arm64/clet list
./publish/osx-arm64/clet help --cat
Notes
- A local commit implementing this exists on
feature/makefile-releases (38ea5db) but couldn't be pushed due to SSH agent being unavailable remotely. The branch can be pushed manually or the work can be redone from this spec.
- Don't modify existing workflow jobs (build, tag, publish-nuget, etc.) — only add the new
release job and update notify-failure's needs array.
Summary
AOT publish is configured and works in CI, but there's no local convenience for building native binaries. The release workflow builds artifacts but doesn't create GitHub Releases with downloadable binaries.
What to do
1. Create
Makefileat repo rootConvenience Makefile for local builds and AOT publishing. Auto-detects RID from
uname.make restoredotnet restoremake buildmake build-releasemake testmake publishpublish/<rid>/. AcceptsRID=linux-x64overridemake publish-allmake cleanrm -rf publish/+dotnet cleanPublish command:
dotnet publish src/Clet -c Release -r $(RID) --self-contained -p:PublishAot=true -o publish/$(RID)2. Add
releasejob to.github/workflows/release.ymlInsert a new job after
tagand beforepublish-nuget. Also addreleaseto thenotify-failurejob'sneedsarray.[resolve-version, build, tag]ubuntu-latestactions/download-artifact@v4toartifacts/dist/:tar -czf dist/clet-<version>-<rid>.tar.gz(afterchmod +x clet)zip -r dist/clet-<version>-win-x64.zipgh release create v<version>:--title "clet v<version>"--generate-notes--prereleaseif version contains-(alpha, develop)dist/*GITHUB_TOKENandgithub.repositoryenv vars3. Update
CLAUDE.mdBuild and Test sectiondotnet run --project tests/Clet.SmokeTests --no-buildto the test commandsVerification
make publish ./publish/osx-arm64/clet --version ./publish/osx-arm64/clet list ./publish/osx-arm64/clet help --catNotes
feature/makefile-releases(38ea5db) but couldn't be pushed due to SSH agent being unavailable remotely. The branch can be pushed manually or the work can be redone from this spec.releasejob and updatenotify-failure'sneedsarray.