Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
87599cb
chore: move python prototype under prototype/python (refs #3)
JoseVelazcoH Jun 24, 2026
a3594b3
feat(capture-core): scaffold + error, schema, database, paths modules…
JoseVelazcoH Jun 24, 2026
10b02c4
feat(capture-core): paths, project inference, session grouping (#3)
JoseVelazcoH Jun 24, 2026
edafd53
feat(capture-core): recorder, cli, logging, integration tests (#3)
JoseVelazcoH Jun 24, 2026
9b051f5
chore: add Cargo.lock and update .gitignore for Rust target dir (#3)
JoseVelazcoH Jun 24, 2026
a10b6e6
fix(database): remove unused TempDir import and mut on conn in tests
JoseVelazcoH Jun 24, 2026
17ac650
refactor(paths): extract pure resolver fns, replace tautological test…
JoseVelazcoH Jun 24, 2026
618f0bd
test(recorder): inject real failures to prove never-fail and retry bo…
JoseVelazcoH Jun 24, 2026
b7182dc
fix(session): remove production unwrap in get_or_create
JoseVelazcoH Jun 24, 2026
c177666
style: apply cargo fmt to paths and recorder
JoseVelazcoH Jun 24, 2026
1aa1273
Merge pull request #4 from JoseVelazcoH/feat/rust-capture-core
JoseVelazcoH Jun 24, 2026
0b3086c
feat(schema): add v3 migration for terminal_id column (#2)
JoseVelazcoH Jun 24, 2026
20f0481
feat(error): add ThothError::Hook variant for lifecycle errors (#2)
JoseVelazcoH Jun 24, 2026
37f66da
feat(recorder): add --terminal-id flag, persist to commands.terminal_…
JoseVelazcoH Jun 24, 2026
6bcd1de
Merge pull request #5 from JoseVelazcoH/feat/hooks-engine
JoseVelazcoH Jun 24, 2026
dfdcf85
docs: add basic README
JoseVelazcoH Jun 24, 2026
bdd38b1
docs: add banner to README
JoseVelazcoH Jun 24, 2026
2666ab6
feat(hooks): add zsh and bash hook scripts for tth record (#2)
JoseVelazcoH Jun 24, 2026
687ea6b
feat(hooks): add hooks.rs lifecycle module with install/uninstall/sta…
JoseVelazcoH Jun 24, 2026
b5b1a29
feat(cli): add install/uninstall/status/new-session-id subcommands, r…
JoseVelazcoH Jun 24, 2026
a0be0cd
test(hooks): add shell integration smoke test script (#2)
JoseVelazcoH Jun 24, 2026
a4b83f8
fix(cli): report lifecycle errors and exit non-zero (#2)
JoseVelazcoH Jun 24, 2026
730338a
fix(hooks): make bash DEBUG trap chaining robust against embedded quo…
JoseVelazcoH Jun 24, 2026
bfe8be0
fix(hooks): use $EPOCHSECONDS instead of date subshell for timestamp …
JoseVelazcoH Jun 24, 2026
d5953b9
test(hooks): make bash record smoke test prove real precmd invocation…
JoseVelazcoH Jun 24, 2026
c63c452
fix(hooks): drop double blank line on block replace, remove tautologi…
JoseVelazcoH Jun 24, 2026
abed7a0
Merge pull request #6 from JoseVelazcoH/feat/hooks-scripts
JoseVelazcoH Jun 24, 2026
b509f5a
feat(error): add ThothError::Search variant for user-facing parse err…
JoseVelazcoH Jun 24, 2026
b765c9c
feat(search): add parse_duration, parse_date, ExitFilter, CommandRow …
JoseVelazcoH Jun 24, 2026
7f35797
feat(search): add SearchArgs, Cmd::Search arm, comfy-table dep, rende…
JoseVelazcoH Jun 24, 2026
7fa5c18
test(search): add E2E assert_cmd tests for tth search (T9) (#7)
JoseVelazcoH Jun 24, 2026
a3ef4d8
test(search): replace tautological FTS hyphen-quoting test with integ…
JoseVelazcoH Jun 24, 2026
17c9ea0
fix(search): validate day-of-month range in parse_ymd per actual mont…
JoseVelazcoH Jun 24, 2026
3ab6616
fix(search): add result count to render_by_session and strengthen sho…
JoseVelazcoH Jun 24, 2026
2d4d7e0
test(search): remove trivial exit_filter_eq and add E2E content asser…
JoseVelazcoH Jun 24, 2026
9343f72
fix(database): double-check version inside BEGIN IMMEDIATE to elimina…
JoseVelazcoH Jun 25, 2026
e39f5df
fix(database): resolve fresh-DB WAL-setup race causing SQLITE_LOCKED …
JoseVelazcoH Jun 25, 2026
343e3a3
refactor(database): remove production unwrap in connection retry loop…
JoseVelazcoH Jun 25, 2026
177dfe2
Merge pull request #8 from JoseVelazcoH/feat/search
JoseVelazcoH Jun 25, 2026
835c261
Merge pull request #10 from JoseVelazcoH/fix/migration-concurrency
JoseVelazcoH Jun 25, 2026
7ad4416
fix: silence shell hook job-control noise
JoseVelazcoH Jun 25, 2026
cdf7a34
Merge pull request #13 from JoseVelazcoH/fix/hook-job-noise
JoseVelazcoH Jun 25, 2026
ec6f7e7
feat(tui): add relative time formatting for history display (#12)
JoseVelazcoH Jun 26, 2026
7bd7d03
feat(tui): launch interactive TUI on bare tth with terminal restore (…
JoseVelazcoH Jun 26, 2026
6ad36d4
Merge pull request #14 from JoseVelazcoH/feat/tui-dispatch
JoseVelazcoH Jun 26, 2026
c4bffbf
feat(tui): add nucleo-matcher fuzzy ranking module (#12)
JoseVelazcoH Jun 26, 2026
9530348
feat(tui): add App state, FilterState, and to_search_args wiring (#12)
JoseVelazcoH Jun 26, 2026
2e3f66a
feat(tui): add pure handle_key event handler with full key coverage (…
JoseVelazcoH Jun 26, 2026
82eac73
feat(tui): wire App and handle_key into run loop; declare new tui sub…
JoseVelazcoH Jun 26, 2026
a71f598
Merge pull request #15 from JoseVelazcoH/feat/tui-app
JoseVelazcoH Jun 26, 2026
21cc60c
feat(tui): add render module with ratatui layout, TestBackend snapsho…
JoseVelazcoH Jun 26, 2026
1af4a52
feat(tui): aligned table columns, ok/fail exit text, controls hint, d…
JoseVelazcoH Jun 26, 2026
882e784
feat(tui): rename header to Thoth and move controls bar to bottom (#12)
JoseVelazcoH Jun 26, 2026
daec1eb
feat(tui): restyle header, list border, and controls bar (#12)
JoseVelazcoH Jun 26, 2026
e04beab
Merge pull request #16 from JoseVelazcoH/feat/tui-render
JoseVelazcoH Jun 26, 2026
fa08e88
feat(tui): add zsh/bash Ctrl-R widget and capture exclusion (#12)
JoseVelazcoH Jun 26, 2026
b27dc60
Merge pull request #17 from JoseVelazcoH/feat/tui-widget
JoseVelazcoH Jun 26, 2026
dc1bac2
test(database): remove false-confidence tests and rewrite atomicity t…
JoseVelazcoH Jun 26, 2026
b06bdd8
test(cli): remove tautological and duplicate tests (#18)
JoseVelazcoH Jun 26, 2026
fe8cef4
test(project): rename misnamed tests to match actual assertions (#18)
JoseVelazcoH Jun 26, 2026
805dbe1
test(search): strengthen weak assertions (#18)
JoseVelazcoH Jun 26, 2026
aeb3455
test(search): remove redundant execute and parse_duration tests (#18)
JoseVelazcoH Jun 26, 2026
0cc95ac
test(cli): remove redundant integration tests (#18)
JoseVelazcoH Jun 26, 2026
332facd
test(search): merge four filter-mapped tests into one and remove redu…
JoseVelazcoH Jun 26, 2026
f3973f6
test(search): remove redundant fuzzy ranking tests (#18)
JoseVelazcoH Jun 26, 2026
67e3e92
test(search): remove interior-point duplicate time tests (#18)
JoseVelazcoH Jun 26, 2026
cbf9d1e
test(search): merge string-variant error tests and add Tui coverage (…
JoseVelazcoH Jun 26, 2026
f526c9f
test(cli): remove duplicate env-wiring test in paths.rs (#18)
JoseVelazcoH Jun 26, 2026
b6236be
style: fix trailing newlines after test removal (#18)
JoseVelazcoH Jun 26, 2026
2ef56af
test(database): exercise real apply_migrations path in atomicity test…
JoseVelazcoH Jun 26, 2026
d521899
Merge pull request #19 from JoseVelazcoH/chore/test-cleanup
JoseVelazcoH Jun 26, 2026
13ff512
feat(forget): implement tth forget command (#20)
JoseVelazcoH Jun 26, 2026
6bf4bcd
refactor(search): use ok/fail text consistently and drop fmt_timestam…
JoseVelazcoH Jun 26, 2026
b9aba32
Merge pull request #21 from JoseVelazcoH/feat/forget
JoseVelazcoH Jun 26, 2026
6912abf
feat(sessions): add tth sessions command (#22)
JoseVelazcoH Jun 26, 2026
95c7035
Merge pull request #23 from JoseVelazcoH/feat/sessions
JoseVelazcoH Jun 26, 2026
aa92ce8
fix(test): clippy and fmt gate on sessions e2e (#22)
JoseVelazcoH Jun 26, 2026
3ecf979
Merge pull request #24 from JoseVelazcoH/fix/sessions-gate
JoseVelazcoH Jun 26, 2026
5a019c4
feat(export): add tth export command (#25)
JoseVelazcoH Jun 26, 2026
71065db
Merge pull request #26 from JoseVelazcoH/feat/export
JoseVelazcoH Jun 26, 2026
1104d72
fix(tui): use TableState stateful render to fix scroll past viewport …
JoseVelazcoH Jun 27, 2026
a0ea6ac
fix(search): lighten batch table to UTF8_BORDERS_ONLY preset (#27)
JoseVelazcoH Jun 27, 2026
74a14dc
feat(tui): bottom-anchored list orientation, atuin-style (#27)
JoseVelazcoH Jun 27, 2026
35943ed
fix(tui): persist TableState across frames to fix bottom-pinned scrol…
JoseVelazcoH Jun 27, 2026
fdf3db5
Merge pull request #28 from JoseVelazcoH/fix/tui-scroll
JoseVelazcoH Jun 27, 2026
fe29f35
feat(init): add tth init <shell> subcommand and write eval line in in…
JoseVelazcoH Jun 27, 2026
1c4c768
test(init): add tth init syntax and function-definition checks to tes…
JoseVelazcoH Jun 27, 2026
a61cf77
Merge pull request #31 from JoseVelazcoH/refactor/tth-init
JoseVelazcoH Jun 27, 2026
6180388
feat(tags): add tth tag/untag/tags/prompt commands and shell wrappers…
JoseVelazcoH Jun 27, 2026
8aea79b
fix(tags): pluralize command count in tags --list (#29)
JoseVelazcoH Jun 27, 2026
7be0d56
Merge pull request #32 from JoseVelazcoH/feat/tags
JoseVelazcoH Jun 27, 2026
d52dcd4
fix(tags): tth prompt explains adding the module to the starship form…
JoseVelazcoH Jun 27, 2026
47d628c
Merge pull request #33 from JoseVelazcoH/fix/prompt-snippet
JoseVelazcoH Jun 27, 2026
c2cb103
feat(prompt): add framework detection and snippet generator (#34)
JoseVelazcoH Jun 27, 2026
f8c52dd
feat(cli): add tth prompt --framework, tth doctor, install prompt hin…
JoseVelazcoH Jun 27, 2026
389367f
test(e2e): doctor, prompt --framework, install hint assertions (#34)
JoseVelazcoH Jun 27, 2026
d4654ee
docs: add Prompt setup section to README (#34)
JoseVelazcoH Jun 27, 2026
67ea2df
fix(test): use &Path instead of &PathBuf in tth_with_env helper (#34)
JoseVelazcoH Jun 27, 2026
7b8aea7
refactor(prompt): drop unused --shell flag from tth prompt (#34)
JoseVelazcoH Jun 27, 2026
5534ab7
Merge pull request #35 from JoseVelazcoH/feat/prompt-setup
JoseVelazcoH Jun 27, 2026
c0f2e72
feat: add tth stats command with project/since filters (#36)
JoseVelazcoH Jun 27, 2026
9070996
Merge pull request #37 from JoseVelazcoH/feat/stats
JoseVelazcoH Jun 27, 2026
e118aed
feat(cli): add help text to all commands and flags (#38)
JoseVelazcoH Jun 27, 2026
55ff9e2
fix(cli): correct --duration and --exit help text (#38)
JoseVelazcoH Jun 27, 2026
11b590d
Merge pull request #39 from JoseVelazcoH/feat/cli-help
JoseVelazcoH Jun 27, 2026
871a0a8
feat: add serde derive dep and ThothError::Config variant (#40)
JoseVelazcoH Jun 27, 2026
5081492
feat: add src/config.rs with Config struct, parse, load, render_confi…
JoseVelazcoH Jun 27, 2026
a771594
feat: thread gap_minutes into get_or_create and record_inner (#40)
JoseVelazcoH Jun 27, 2026
11295a4
feat: change SearchArgs.limit to Option<usize> and wire config defaul…
JoseVelazcoH Jun 27, 2026
84c50a2
feat: add is_bottom param to draw, support top orientation in TUI (#40)
JoseVelazcoH Jun 27, 2026
2db0cf6
feat: add config path line to doctor output (#40)
JoseVelazcoH Jun 27, 2026
6eb6c59
Merge pull request #41 from JoseVelazcoH/feat/config
JoseVelazcoH Jun 27, 2026
ffb26cf
feat(config): add config subcommand group with get/set/print and defa…
JoseVelazcoH Jun 27, 2026
8f301aa
Merge pull request #43 from JoseVelazcoH/feat/config-ux
JoseVelazcoH Jun 27, 2026
3e85df3
feat(filters-columns): add configurable columns, search filter, histo…
JoseVelazcoH Jun 27, 2026
c845a36
Merge pull request #45 from JoseVelazcoH/feat/filters-columns
JoseVelazcoH Jun 27, 2026
d87477f
feat(tui): add configurable columns and header row (#46)
JoseVelazcoH Jun 27, 2026
a583336
Merge pull request #47 from JoseVelazcoH/feat/tui-columns
JoseVelazcoH Jun 27, 2026
128752a
feat(tui): content-aware column widths so command gets the freed space
JoseVelazcoH Jun 27, 2026
90fe93b
feat(tui): add tabbed Sessions view with master-detail pane (#48)
JoseVelazcoH Jun 27, 2026
f842806
test(tui): add sessions tab buffer dump test (#48)
JoseVelazcoH Jun 27, 2026
5257bf7
Merge pull request #49 from JoseVelazcoH/feat/tui-sessions-tab
JoseVelazcoH Jun 27, 2026
cc54bb7
fix(tui): correct up/down direction in the sessions pane (#48)
JoseVelazcoH Jun 27, 2026
84c9549
test(tui): fix sessions pane direction assertions (#48)
JoseVelazcoH Jun 27, 2026
ca038b6
feat(db): add workspace column via migration v4 (#50)
JoseVelazcoH Jun 27, 2026
641c05c
feat(workspaces): add workspaces module with start/end/normalize/list…
JoseVelazcoH Jun 27, 2026
1e71755
feat(search): add workspace field to CommandRow (#50)
JoseVelazcoH Jun 27, 2026
81c35f1
feat(recorder): thread workspace through record_inner and INSERT (#50)
JoseVelazcoH Jun 27, 2026
d96f717
feat(cli): add workspace/workspaces subcommands and --workspace flag …
JoseVelazcoH Jun 27, 2026
52d223f
feat(shells): add tth-sw/tth-ew functions and --workspace hook arg (#50)
JoseVelazcoH Jun 27, 2026
51b52b2
Merge pull request #51 from JoseVelazcoH/feat/workspaces-recording
JoseVelazcoH Jun 27, 2026
9af3f45
feat(tui): replace Sessions tab with read-only Workspaces tab (#52)
JoseVelazcoH Jun 27, 2026
9a79002
Merge pull request #53 from JoseVelazcoH/feat/workspaces-tui-tab
JoseVelazcoH Jun 27, 2026
85bf824
feat(export): add workspace filter and render_replay_script (#54)
JoseVelazcoH Jun 27, 2026
92e0222
feat(tui/app): add ConfirmReplay, Replay action, and replay confirm m…
JoseVelazcoH Jun 27, 2026
0a14362
feat(tui/event): route confirm modal keys and open confirm on ws Ente…
JoseVelazcoH Jun 27, 2026
1f079c2
feat(tui): render confirm modal, REPLAY action line, and build replay…
JoseVelazcoH Jun 27, 2026
f3f91f3
feat(shells): add REPLAY branch to widget handlers (#54)
JoseVelazcoH Jun 27, 2026
ce311d5
Merge pull request #55 from JoseVelazcoH/feat/workspaces-replay
JoseVelazcoH Jun 27, 2026
726ad9a
feat(search): add id field to CommandRow (#56)
JoseVelazcoH Jun 27, 2026
01d72fe
feat(tui): vim modal, pane focus, and DELETE command (#56)
JoseVelazcoH Jun 27, 2026
d3434bc
style(tui): fmt render.rs dump test (#56)
JoseVelazcoH Jun 27, 2026
f55c3cd
fix(tui): allow Ctrl-C to exit while a confirm modal is open (#56)
JoseVelazcoH Jun 27, 2026
2c0454f
Merge pull request #57 from JoseVelazcoH/feat/tui-modal-delete
JoseVelazcoH Jun 27, 2026
bc6af26
feat(tui): add in-place command edit via DELETE+INSERT for FTS safety…
JoseVelazcoH Jun 27, 2026
9f35335
Merge pull request #59 from JoseVelazcoH/feat/tui-edit
JoseVelazcoH Jun 27, 2026
76a780d
fix(tui): run workspace replay directly when stdout is a tty, fix zsh…
JoseVelazcoH Jun 27, 2026
ecefb32
fix(tui): run workspace replay in the interactive shell so functions/…
JoseVelazcoH Jun 27, 2026
8468894
feat(tui): echo each command before running it during workspace repla…
JoseVelazcoH Jun 27, 2026
713a130
refactor: replace temp-file replay with inline command emission (#60)
JoseVelazcoH Jun 27, 2026
bbab731
feat: default history filter ignores tth commands (#60)
JoseVelazcoH Jun 27, 2026
8cb2208
Merge pull request #61 from JoseVelazcoH/feat/inline-replay-tth-filter
JoseVelazcoH Jun 27, 2026
2bb55b6
fix(tui): separate replay commands with ; so a benign non-zero exit d…
JoseVelazcoH Jun 27, 2026
431b30a
style(tui): uniform cyan selection bar, green active tab and command …
JoseVelazcoH Jun 27, 2026
a8d83c8
style(tui): blue-purple selection bar, green controls keys, plain com…
JoseVelazcoH Jun 27, 2026
88f8ee5
style(tui): use the blue-purple selection background for the active t…
JoseVelazcoH Jun 27, 2026
fb0e8e0
feat(theme): add Theme struct, 7 built-in themes, and parse_color (#62)
JoseVelazcoH Jun 27, 2026
88f1615
Merge pull request #63 from JoseVelazcoH/feat/theme-module
JoseVelazcoH Jun 28, 2026
4bf6212
feat(config): add ThemeSection, apply_theme_file, resolve_theme (#64)
JoseVelazcoH Jun 28, 2026
f941032
feat(app): add theme field to App, init from Theme::default (#64)
JoseVelazcoH Jun 28, 2026
e8b1943
feat(render): replace hardcoded colors with theme slots, thread theme…
JoseVelazcoH Jun 28, 2026
3f8fd62
Merge pull request #65 from JoseVelazcoH/feat/theme-wiring
JoseVelazcoH Jun 28, 2026
8de4279
test: add e2e tests for tth theme command (#66)
JoseVelazcoH Jun 28, 2026
fd5c693
feat: add tth theme command to show, list, and switch themes (#66)
JoseVelazcoH Jun 28, 2026
e9627c9
Merge pull request #67 from JoseVelazcoH/feat/theme-command
JoseVelazcoH Jun 28, 2026
2e31472
feat(tui): search history by tag in the fuzzy filter and render tags …
JoseVelazcoH Jun 28, 2026
87b71f0
feat(tui): extend fuzzy haystack with project and directory fields (#68)
JoseVelazcoH Jun 28, 2026
66331a2
feat(tui): add preview pane to History tab with selected command deta…
JoseVelazcoH Jun 28, 2026
1618f67
Merge pull request #69 from JoseVelazcoH/feat/history-preview
JoseVelazcoH Jun 28, 2026
1ec2289
style: rustfmt fuzzy.rs test formatting
JoseVelazcoH Jun 28, 2026
8977f6f
feat(tui): add parse_query DSL parser and fuzzy_query split (#70)
JoseVelazcoH Jun 28, 2026
e7da917
feat(tui): wire apply_query into insert handler and thread now param …
JoseVelazcoH Jun 28, 2026
12fdd2f
feat(tui): add dur chip, help overlay, and ? hint in controls (#70)
JoseVelazcoH Jun 28, 2026
9795834
Merge pull request #71 from JoseVelazcoH/feat/dsl-filters
JoseVelazcoH Jun 28, 2026
dc0e3f8
fix(search): match project case-insensitively as a substring, tags ca…
JoseVelazcoH Jun 28, 2026
e9d6836
feat(tui): add cmdline state and methods, fix recompute to use raw qu…
JoseVelazcoH Jun 28, 2026
f71719a
feat(tui): wire cmdline popup keys and revert insert DSL parsing #72
JoseVelazcoH Jun 28, 2026
ecac4a3
feat(tui): render cmdline popup and update help overlay and normal co…
JoseVelazcoH Jun 28, 2026
1e1dc2e
Merge pull request #73 from JoseVelazcoH/feat/cmdline-filters
JoseVelazcoH Jun 28, 2026
ca2b571
style(tui): reorganize help overlay into Filters and Keys sections
JoseVelazcoH Jun 28, 2026
76b7a16
build: add package metadata (description, license, repository, keywords)
JoseVelazcoH Jun 28, 2026
9c29ab4
ci: set up cargo-dist for cross-platform release builds and installers
JoseVelazcoH Jun 28, 2026
93c9d95
fix(shells): load zsh/datetime and round duration without zsh/mathfunc
JoseVelazcoH Jun 28, 2026
9b0415f
docs: add demo recording (vhs tape, seed script, gif)
JoseVelazcoH Jun 28, 2026
ed6ef98
docs: rewrite README in English, add features guide and demo assets
JoseVelazcoH Jun 28, 2026
d9df6bc
docs: add CONTRIBUTING and CODE_OF_CONDUCT
JoseVelazcoH Jun 28, 2026
51b0662
docs: rewrite README in English, add features guide and demo assets
JoseVelazcoH Jun 28, 2026
55ba4ac
docs: polish commit-convention guide
JoseVelazcoH Jun 28, 2026
d0418c0
chore: set version to 0.1.0-rc.1 for release dry run
JoseVelazcoH Jun 28, 2026
b1ddae3
chore: release 0.1.0
JoseVelazcoH Jun 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 296 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
#
# Copyright 2022-2024, axodotdev
# SPDX-License-Identifier: MIT or Apache-2.0
#
# CI that:
#
# * checks for a Git Tag that looks like a release
# * builds artifacts with dist (archives, installers, hashes)
# * uploads those artifacts to temporary workflow zip
# * on success, uploads the artifacts to a GitHub Release
#
# Note that the GitHub Release will be created with a generated
# title/body based on your changelogs.

name: Release
permissions:
"contents": "write"

# This task will run whenever you push a git tag that looks like a version
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
#
# If PACKAGE_NAME is specified, then the announcement will be for that
# package (erroring out if it doesn't have the given version or isn't dist-able).
#
# If PACKAGE_NAME isn't specified, then the announcement will be for all
# (dist-able) packages in the workspace with that version (this mode is
# intended for workspaces with only one dist-able package, or with all dist-able
# packages versioned/released in lockstep).
#
# If you push multiple tags at once, separate instances of this workflow will
# spin up, creating an independent announcement for each one. However, GitHub
# will hard limit this to 3 tags per commit, as it will assume more tags is a
# mistake.
#
# If there's a prerelease-style suffix to the version, then the release(s)
# will be marked as a prerelease.
on:
pull_request:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'

jobs:
# Run 'dist plan' (or host) to determine what tasks we need to do
plan:
runs-on: "ubuntu-22.04"
outputs:
val: ${{ steps.plan.outputs.manifest }}
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }}
publishing: ${{ !github.event.pull_request }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Install dist
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.32.0/cargo-dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@v7
with:
name: cargo-dist-cache
path: ~/.cargo/bin/dist
# sure would be cool if github gave us proper conditionals...
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
# functionality based on whether this is a pull_request, and whether it's from a fork.
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
# but also really annoying to build CI around when it needs secrets to work right.)
- id: plan
run: |
dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
echo "dist ran successfully"
cat plan-dist-manifest.json
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
- name: "Upload dist-manifest.json"
uses: actions/upload-artifact@v7
with:
name: artifacts-plan-dist-manifest
path: plan-dist-manifest.json

# Build and packages all the platform-specific things
build-local-artifacts:
name: build-local-artifacts (${{ join(matrix.targets, ', ') }})
# Let the initial task tell us to not run (currently very blunt)
needs:
- plan
if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
strategy:
fail-fast: false
# Target platforms/runners are computed by dist in create-release.
# Each member of the matrix has the following arguments:
#
# - runner: the github runner
# - dist-args: cli flags to pass to dist
# - install-dist: expression to run to install dist on the runner
#
# Typically there will be:
# - 1 "global" task that builds universal installers
# - N "local" tasks that build each platform's binaries and platform-specific installers
matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container && matrix.container.image || null }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
steps:
- name: enable windows longpaths
run: |
git config --global core.longpaths true
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Install Rust non-interactively if not already installed
if: ${{ matrix.container }}
run: |
if ! command -v cargo > /dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Install dist
run: ${{ matrix.install_dist.run }}
# Get the dist-manifest
- name: Fetch local artifacts
uses: actions/download-artifact@v8
with:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true
- name: Install dependencies
run: |
${{ matrix.packages_install }}
- name: Build artifacts
run: |
# Actually do builds and make zips and whatnot
dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
echo "dist ran successfully"
- id: cargo-dist
name: Post-build
# We force bash here just because github makes it really hard to get values up
# to "real" actions without writing to env-vars, and writing to env-vars has
# inconsistent syntax between shell and powershell.
shell: bash
run: |
# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
dist print-upload-files-from-manifest --manifest dist-manifest.json >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"

cp dist-manifest.json "$BUILD_MANIFEST_NAME"
- name: "Upload artifacts"
uses: actions/upload-artifact@v7
with:
name: artifacts-build-local-${{ join(matrix.targets, '_') }}
path: |
${{ steps.cargo-dist.outputs.paths }}
${{ env.BUILD_MANIFEST_NAME }}

# Build and package all the platform-agnostic(ish) things
build-global-artifacts:
needs:
- plan
- build-local-artifacts
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Install cached dist
uses: actions/download-artifact@v8
with:
name: cargo-dist-cache
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/dist
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
uses: actions/download-artifact@v8
with:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true
- id: cargo-dist
shell: bash
run: |
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
echo "dist ran successfully"

# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"

cp dist-manifest.json "$BUILD_MANIFEST_NAME"
- name: "Upload artifacts"
uses: actions/upload-artifact@v7
with:
name: artifacts-build-global
path: |
${{ steps.cargo-dist.outputs.paths }}
${{ env.BUILD_MANIFEST_NAME }}
# Determines if we should publish/announce
host:
needs:
- plan
- build-local-artifacts
- build-global-artifacts
# Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: "ubuntu-22.04"
outputs:
val: ${{ steps.host.outputs.manifest }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Install cached dist
uses: actions/download-artifact@v8
with:
name: cargo-dist-cache
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/dist
# Fetch artifacts from scratch-storage
- name: Fetch artifacts
uses: actions/download-artifact@v8
with:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true
- id: host
shell: bash
run: |
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
echo "artifacts uploaded and released successfully"
cat dist-manifest.json
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
- name: "Upload dist-manifest.json"
uses: actions/upload-artifact@v7
with:
# Overwrite the previous copy
name: artifacts-dist-manifest
path: dist-manifest.json
# Create a GitHub Release while uploading all files to it
- name: "Download GitHub Artifacts"
uses: actions/download-artifact@v8
with:
pattern: artifacts-*
path: artifacts
merge-multiple: true
- name: Cleanup
run: |
# Remove the granular manifests
rm -f artifacts/*-dist-manifest.json
- name: Create GitHub Release
env:
PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
RELEASE_COMMIT: "${{ github.sha }}"
run: |
# Write and read notes from a file to avoid quoting breaking things
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt

gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*

announce:
needs:
- plan
- host
# use "always() && ..." to allow us to wait for all publish jobs while
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' }}
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ logs/

# Hatch
.hatch/


# Added by cargo

/target
Loading