Commit Graph

17 Commits

Author SHA1 Message Date
aesoft 6303e9530a fix(cicd): Clean cicd, rework depends and add pre-release
- Cleaned all files for a more reusable cicd
- Added pre-release on develop
- Added jobs dependencies to gain time (avoid running all if mandatory fail)
- Add CICD.md documentation
2026-03-13 13:24:46 +01:00
patrick szymkowiak 6099bb8d25 ci: add Discord notification on release (#375)
Sends an embed with version, release notes, and link to the GitHub
release page via the RTK_DISCORD_RELEASE webhook secret.
2026-03-06 13:05:46 +01:00
patrick szymkowiak baff6a2334 feat: anonymous telemetry ping (1/day, opt-out) (#334)
* feat: add anonymous telemetry ping (1/day, opt-out)

Fire-and-forget daily ping to track active installs for BPI metrics.
- SHA-256 device hash (hostname:user), no PII
- Opt-out: RTK_TELEMETRY_DISABLED=1 or config.toml [telemetry] enabled=false
- Token injected at compile time via option_env!, not in source
- 23h throttle via marker file, 2s timeout, non-blocking thread

* ci: inject RTK_TELEMETRY_TOKEN at build time in release workflow

All 3 build jobs (binary, DEB, RPM) now receive the token from
GitHub secrets so option_env!() compiles it into release binaries.

* refactor: externalize telemetry URL via option_env!(RTK_TELEMETRY_URL)

URL and token are both injected at compile time — no hardcoded
server address in source code. Builds without the env var simply
skip telemetry silently.
2026-03-05 15:34:49 +01:00
Vincent Vanackere 3b84b33e3c ci: replace x86_64-unknown-linux-gnu with musl target for static binaries (#267)
The current x86_64-unknown-linux-gnu release binary dynamically links against glibc, which causes failures on systems with an older glibc version:

rtk: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by rtk)

Replace the x86_64-unknown-linux-gnu build target with x86_64-unknown-linux-musl, producing a fully statically-linked binary with no libc dependency.

Fixes rtk-ai/rtk#265 - binary fails on systems with old glibc.
2026-02-28 18:38:52 +01:00
patrick szymkowiak c84fa3c060 fix: add website URL (rtk-ai.app) across project metadata (#81)
- Cargo.toml: add homepage field
- README.md: add website/github/install links
- Formula/rtk.rb: update homepage to website
- release.yml: update homepage and docs link in formula template

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:28:37 +01:00
patrick szymkowiak a0d2184bfe feat(ci): automate Homebrew formula update on release (#80)
Replaces the commented-out TODO homebrew section with a working
automation modeled on rtk-ai/vox's release pipeline.

On each release, the new homebrew job:
1. Downloads checksums.txt from the just-published release
2. Parses sha256 for all 4 platforms (macOS/Linux × Intel/ARM)
3. Generates the formula with correct version and hashes
4. Pushes to rtk-ai/homebrew-tap via GitHub API

Requires HOMEBREW_TAP_TOKEN org secret (already used by vox).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:26:16 +01:00
Patrick szymkowiak bd76b36190 fix(ci): fix release workflow not uploading artifacts to GitHub releases
Closes #73

Three issues prevented release-please from uploading build artifacts:

1. Upload steps had `if: github.event_name == 'workflow_call'` conditions
   that evaluated to false when called from release-please (event_name
   reflects the caller's `push` event, not `workflow_call`)
2. Missing `secrets: inherit` in release-please.yml workflow_call
3. Dead `on: release: published` trigger (GITHUB_TOKEN actions can't
   trigger other workflows)

Fix aligned with working rtk-ai/vox pipeline:
- Remove conditional `if` on upload step (always upload)
- Simplify version detection with `inputs.tag` fallback
- Remove dead `release: published` trigger
- Add `secrets: inherit` to workflow_call

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:54:23 +01:00
Florian BRUNIAUX 3b44ef9865 fix: trigger release build after release-please creates tag
Fixes #27

Tags created by GITHUB_TOKEN don't trigger other workflows. This change
makes release-please call release.yml directly via workflow_call after
creating a release.

Changes:
- release.yml: Add workflow_call trigger with tag input
- release.yml: Handle workflow_call in version detection
- release.yml: Upload assets for workflow_call events
- release-please.yml: Add build-release job that calls release.yml
- release-please.yml: update-latest-tag now waits for build to complete

This approach:
- Requires no PAT/secrets
- Keeps workflows separate and maintainable
- Uses workflow_call (cleaner than workflow_dispatch)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:36:53 +01:00
Florian BRUNIAUX 264539cf20 fix: release pipeline trigger and version-agnostic package URLs
Patrick reported 2 critical issues post-merge PR #23:

1. **release.yml never triggers**: release-please creates tags via GitHub API
   → no push event generated → build workflow never runs
   → v0.5.1 released without binaries

2. **README install URLs 404**: DEB/RPM URLs hardcode version 0.3.1
   → /releases/latest/download/ serves different filenames
   → all releases > 0.3.1 break installation instructions

Root cause analysis:
- release-please creates GitHub Releases (triggers `release.published` event)
- release.yml only listens to `on: push: tags` (doesn't fire for API-created tags)
- Standard pattern: release-please + binary builds = `on: release.published`

Fixes:
1. release.yml trigger:
   - Add `on: release: types: [published]` (standard release-please pattern)
   - Remove `on: push: tags: ['v*']` (dead code with release-please)
   - Update version extraction to handle `release` event
   - Split release job: upload assets (release event) vs create release (workflow_dispatch)

2. Version-agnostic package naming:
   - Create copies: rtk_0.5.0-1_amd64.deb → rtk_amd64.deb
   - Create copies: rtk-0.5.0-1.x86_64.rpm → rtk.x86_64.rpm
   - Update README URLs to use version-agnostic names
   - /releases/latest/download/ now serves stable filenames

Impact:
- release-please releases now auto-trigger binary builds
- Installation URLs work for all future releases
- No manual workflow_dispatch needed for new versions

Manual action required:
Patrick needs to re-run build for v0.5.1 via workflow_dispatch
(or create v0.5.2 with a trivial fix commit)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 16:29:15 +01:00
Florian BRUNIAUX 9e322e2aee fix: patrick's 3 issues (latest tag, ccusage fallback, versioning)
1. CRITICAL: Fix 'latest' tag creation after releases
   - Move update-latest-tag job from release.yml to release-please.yml
   - release-please creates tags via API (no push event) → must run in same workflow
   - Job now conditional on release_created output

2. IMPORTANT: Add npx fallback for ccusage + improve message
   - Check binary in PATH first, fallback to 'npx ccusage'
   - Updated message: "npm i -g ccusage (or use npx ccusage)"
   - Consistent with other JS tooling (next_cmd, tsc_cmd, prettier_cmd)

3. PROCESS: Slow down version bumps with release-please config
   - Add release-please-config.json with bump-patch-for-minor-pre-major
   - In 0.x versions: feat: → patch bump instead of minor
   - Prevents rapid version inflation (0.3.1 → 0.5.0 in 21h)

Fixes issues raised by Patrick after PR #21 merge.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 15:24:56 +01:00
Florian BRUNIAUX 3d76900469 ci: automate 'latest' tag update on releases
Add automated workflow step to update the 'latest' tag after each
successful release. This ensures 'latest' always points to the most
recent stable version without manual intervention.

The new job:
- Runs after successful release completion
- Updates 'latest' tag to point to the new semver tag
- Uses force push to move the tag reference
- Includes version info in tag annotation message

Benefits:
- Install scripts can reliably use /releases/latest/download/
- No manual tag management needed
- Consistent reference for "current stable" across platforms

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-30 10:26:20 +01:00
Florian BRUNIAUX 22c3017ed5 feat: add CI/CD automation (release management and automated metrics)
## Release automation
- Add release-please workflow for automatic semantic versioning
- Configure release.yml to only trigger on tags (avoid double-release)

## Benchmark automation
- Extend benchmark.yml with README auto-update
- Add permissions for contents and pull-requests writes
- Auto-create PR with updated metrics via peter-evans/create-pull-request
- Add scripts/update-readme-metrics.sh for CI integration

## Verification
- ✅ Workflows ready for CI/CD pipeline
- ✅ No breaking changes to existing functionality

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 16:45:17 +01:00
Patrick szymkowiak bd61f6db50 chore: bump version to 0.2.1 and trigger release on master push 2026-01-28 22:54:51 +01:00
Patrick szymkowiak 561446254e chore: disable homebrew step for now 2026-01-23 15:41:48 +01:00
Patrick szymkowiak 2d40c7c02d fix: correct rust-toolchain action and macos runner 2026-01-23 14:16:12 +01:00
Patrick szymkowiak f8c9a8165f feat: add SQLite tracking, gain command, and CI/CD
- Add SQLite tracking for all commands (90-day history)
- Add rtk gain command with ASCII graph visualization
- Add config.rs for TOML configuration support
- Integrate tracking in all command modules
- Add CI/CD workflow for multi-platform releases (deb, rpm, win, mac)
- Add LICENSE file and improve .gitignore
2026-01-23 14:02:10 +01:00
Patrick szymkowiak daab79cca4 Initial commit: rtk (Rust Token Killer) v0.1.0
High-performance CLI proxy to minimize LLM token consumption:
- rtk ls: Token-optimized directory tree (filters .git, node_modules, etc.)
- rtk read: Intelligent code filtering (minimal/aggressive modes)
- rtk smart: Local LLM summaries via candle-core (Llama-3.2-1B)
Includes CI/CD (GitHub Actions), Homebrew formula, and install script.
2026-01-22 18:10:30 +01:00