Commit graph

107 commits

Author SHA1 Message Date
rcourtman
d36b4ce6c8 fix: create tag before draft release (GitHub API limitation)
Draft releases cannot create tags via the GitHub API, resulting in
'untagged-xxx' releases. Fixed by creating the tag first, then
creating the draft release pointing to it.

See: https://github.com/cli/cli/issues/11589
2025-11-26 15:48:56 +00:00
rcourtman
eddc9356af refactor: build Docker images once, retag on publish
- Preflight builds multi-arch images to staging tags on GHCR
- Publish workflow just retags staging → final (no rebuild)
- Reduces publish time from ~10min to ~1min
2025-11-26 15:35:34 +00:00
rcourtman
ea9a9e3a08 refactor: split Docker publish into separate workflow
Docker images now build only after release is published, not during
the draft creation phase. This prevents users from getting updates
before the release is reviewed and approved.
2025-11-26 15:28:11 +00:00
rcourtman
e467523a61 feat: serve install scripts from GitHub releases instead of main branch
Scripts like install.sh and install-sensor-proxy.sh are now attached
as release assets and downloaded from releases/latest/download/ URLs.
This ensures users always get scripts compatible with their installed
version, even while development continues on main.

Changes:
- build-release.sh: copy install scripts to release directory
- create-release.yml: upload scripts as release assets
- Updated all documentation and code references to use release URLs
- Scripts reference each other via release URLs for consistency
2025-11-26 08:59:59 +00:00
rcourtman
0c7b61c989 Fix: let GitHub API create the tag, don't pre-create it
GitHub's API has a quirk: if you POST to /releases with a tag_name
that already exists as a git tag, it creates an 'untagged' release
instead of attaching to the existing tag.

The fix is to let the API create both tag and release together.
2025-11-23 09:51:51 +00:00
rcourtman
9dc7990fbe Add target_commitish to release API call
Without target_commitish, GitHub creates an untagged release
even when the tag exists.
2025-11-23 09:37:35 +00:00
rcourtman
db120a8e9b Fix: use GitHub API directly for release creation
gh release create doesn't work properly when the tag already exists -
it creates an 'untagged' release instead of attaching to the existing tag.

Using the API directly with POST to /releases fixes this.
2025-11-23 09:24:04 +00:00
rcourtman
a5fb98e7c6 Fix: create git tag explicitly before release
gh release create with --target was still creating untagged releases.
The fix is to create and push the git tag explicitly first, then
create the release which will properly attach to the existing tag.
2025-11-23 09:09:37 +00:00
rcourtman
b484ba1f5d Fix release workflow to create tag automatically
The workflow was broken because it expected a tag to exist but the
documented process never created one. This caused gh release create
to fail with 'untagged' releases.

Changes:
- Workflow now creates the tag using --target flag
- Simplified release creation logic (no retry loops needed)
- Removed confusing comment about 'tag already exists'

This fixes the fundamental issue where the workflow and documented
process were out of sync.
2025-11-23 08:55:12 +00:00
courtmanr@gmail.com
2c00cd7806 chore(ci): keep release as draft for manual review 2025-11-23 08:25:37 +00:00
courtmanr@gmail.com
dedce8796b fix(ci): robustly handle existing and untagged releases in workflow 2025-11-23 08:05:11 +00:00
courtmanr@gmail.com
413e84b925 Auto-publish release after validation for v4.32.4 2025-11-23 00:21:15 +00:00
rcourtman
40278bbb22 Prevent helm chart releases from becoming latest 2025-11-20 16:35:55 +00:00
rcourtman
e467b3d6c0 Skip demo update when target version already running 2025-11-20 15:08:34 +00:00
rcourtman
3c97e520d6 Skip demo updates for non-latest releases 2025-11-20 15:00:23 +00:00
rcourtman
f3b6cff34a Avoid committing Helm chart on release runs 2025-11-20 14:49:56 +00:00
rcourtman
7f93b590b7 Improve release workflows and cache usage 2025-11-20 13:59:15 +00:00
rcourtman
ce1f6c92ab Reuse docker build cache between integration and release builds 2025-11-20 10:13:01 +00:00
rcourtman
bdcde70b81 Handle host agent overrides in thresholds
Related to #722
2025-11-20 10:02:19 +00:00
rcourtman
d5c4bef414 Tighten release workflow triggers and test entrypoint 2025-11-20 09:59:42 +00:00
rcourtman
a4f39c6959 Stop release workflow from auto-triggering on tags 2025-11-20 09:56:08 +00:00
rcourtman
1c7991954e CI: remove unsupported vitest args 2025-11-14 13:41:16 +00:00
rcourtman
20194d9bb7 Add CI build workflow and tighten proxy diagnostics 2025-11-14 13:32:29 +00:00
rcourtman
4d021f8a50 Related to #701: improve sensor proxy installer caching 2025-11-14 00:51:54 +00:00
rcourtman
86bc617940 Fix YAML syntax errors in workflow files 2025-11-13 23:54:55 +00:00
rcourtman
99b53afc49 Add branch trigger for testing 2025-11-13 23:48:19 +00:00
rcourtman
b650f7e174 Add minimal test workflow 2025-11-13 23:45:23 +00:00
rcourtman
3f8c994aa9 Use GITHUB_EVENT_PATH to parse inputs avoiding template context errors 2025-11-13 23:44:40 +00:00
rcourtman
f1303cf339 Fix workflow inputs context for push events 2025-11-13 23:42:59 +00:00
rcourtman
a8b6143408 Re-add tag trigger to enable workflow 2025-11-13 23:37:48 +00:00
rcourtman
039aba5df1 Match dry-run workflow format exactly 2025-11-13 23:29:56 +00:00
rcourtman
f886a3a422 Rename workflow file to force new workflow_id 2025-11-13 23:29:19 +00:00
rcourtman
cb8c1075fd Remove tag trigger to test workflow_dispatch 2025-11-13 23:28:57 +00:00
rcourtman
7e90ce0377 Add test workflow to diagnose dispatch issue 2025-11-13 23:26:39 +00:00
rcourtman
b36c988173 Add new pulse-release workflow with unique name 2025-11-13 23:23:39 +00:00
rcourtman
8f42dae363 Remove duplicate release workflows to force GitHub re-indexing 2025-11-13 23:23:16 +00:00
rcourtman
cc42007b00 Force workflow re-index for v4.31.0 release 2025-11-13 23:18:12 +00:00
rcourtman
c8fc20dae0 Add release-v2 workflow (fresh copy) 2025-11-13 12:51:26 +00:00
rcourtman
ad4318a16f Restore release workflow 2025-11-13 12:48:52 +00:00
rcourtman
0a4938e6ff Remove workflow temporarily 2025-11-13 12:48:35 +00:00
rcourtman
c29846d44b Force workflow re-index 2025-11-13 12:46:36 +00:00
rcourtman
2c2c2d758a Make release_notes optional to fix workflow indexing 2025-11-13 12:44:15 +00:00
rcourtman
bf8fcd21d7 Add dual trigger support (tag push + workflow_dispatch) 2025-11-13 12:39:20 +00:00
rcourtman
44a3780ad7 Force workflow re-index 2025-11-13 12:37:16 +00:00
rcourtman
37c53a9d5f Restore simple workflow: Claude passes release notes directly
Back to the working pattern:
- Claude generates release notes
- Passes them directly to workflow via workflow_dispatch input
- No tag annotation reading complexity
- Simple: gh workflow run -f version=X.Y.Z -f release_notes="..."

This is what you wanted and what actually works reliably.
2025-11-13 12:28:00 +00:00
rcourtman
00da544541 Switch to reliable workflow_dispatch trigger for releases
Tag push triggers in GitHub Actions are unreliable (known issue).
Major projects don't actually use automatic tag triggers - they use
workflow_dispatch or other manual triggers.

Changes:
- Remove tag push trigger
- Use workflow_dispatch with version input
- Workflow validates that annotated tag already exists
- Tag still stores LLM changelog in annotation
- Manual trigger: gh workflow run release.yml -f version=X.Y.Z

This is the pattern that actually works reliably.
2025-11-13 12:24:34 +00:00
rcourtman
739d1a1d4e Add workflow_dispatch fallback for tag-triggered releases
GitHub Actions has a known issue where tag pushes sometimes don't
trigger workflows. Add workflow_dispatch as a backup trigger that
accepts a tag parameter.

This allows manual triggering if automatic tag push trigger fails.
2025-11-13 12:21:11 +00:00
rcourtman
48d8c743ae Optimize release workflow for speed
Preflight tests improvements:
- Add npm cache for frontend dependencies (saves ~30-60s)
- Add Go module cache (saves ~20-40s)
- Add Playwright browser cache (saves ~40-60s)
- Remove excessive diagnostic output (saves ~10-20s)
- Total preflight savings: ~2-3 minutes

Docker build improvements:
- Enable Docker layer caching via registry (saves ~2-4 min per build)
- Cache stored in GHCR as :buildcache tags
- Reuses unchanged layers across releases
- First build same time, subsequent builds much faster
- Total Docker savings: ~4-8 minutes on releases with few changes

Expected total time reduction: 6-11 minutes on typical releases
No functionality sacrificed - all tests and validations remain.
2025-11-13 12:00:36 +00:00
rcourtman
a067e4ad35 Require LLM-written changelogs in tag annotations
Remove GitHub auto-generation fallback. Tags MUST be annotated
with Claude-written release notes.

Why:
- LLMs write semantic, user-focused changelogs
- Filters out dev/internal commits
- Explains features in terms users understand
- GitHub's auto-gen is just raw commit dumps

Workflow now fails fast with clear error if tag lacks annotation.
2025-11-13 11:57:26 +00:00
rcourtman
e782468f4a Support Claude-written changelogs in tag annotations
Workflow now checks for annotated tags and uses the annotation
as release notes. If no annotation exists, falls back to GitHub's
auto-generation.

This allows Claude to write formatted release notes when creating
releases, stored directly in git history as part of the tag.
2025-11-13 11:56:02 +00:00