diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index cda996e..c83bab1 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -4,7 +4,7 @@ on: pull_request: branches: - "main" - types: [opened,labeled,edited,synchronize] + types: [labeled,edited,synchronize] jobs: test-artifacts: diff --git a/CLAUDE.md b/CLAUDE.md index 6837452..e5dbf6b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -150,7 +150,7 @@ Projects can include a `rheo.toml` configuration file in the project root to cus **Example rheo.toml:** ```toml -version = "0.1.1" +version = "0.1.2" content_dir = "content" @@ -172,9 +172,9 @@ formats = ["html", "pdf"] ```toml # Manifest version (required) -version = "0.1.1" # Required: Manifest version for rheo.toml API compatibility - # Must be valid semver (e.g., "0.1.1") - # Current supported version: 0.1.1 +version = "0.1.2" # Required: Manifest version for rheo.toml API compatibility + # Must be valid semver (e.g., "0.1.2") + # Current supported version: 0.1.2 # Project-level configuration content_dir = "content" # Directory containing .typ files (relative to project root) @@ -233,7 +233,7 @@ vertebrae = ["cover.typ", "chapters/**/*.typ"] # Glob patterns for files to inc **Configuration Field Details:** **Top-level fields:** -- `version` (string, required): Manifest version for rheo.toml API compatibility. Must be valid semver (e.g., "0.1.1"). The manifest version must match the rheo CLI version. Current supported version: 0.1.1 +- `version` (string, required): Manifest version for rheo.toml API compatibility. Must be valid semver (e.g., "0.1.2"). The manifest version must match the rheo CLI version. Current supported version: 0.1.2 - `content_dir` (string, optional): Directory containing .typ source files. If omitted, searches entire project root. - `build_dir` (string, optional): Output directory for compiled files. Defaults to `./build`. - `formats` (array of strings, optional): Default output formats. Defaults to `["html", "epub", "pdf"]`. @@ -269,15 +269,15 @@ vertebrae = ["cover.typ", "chapters/**/*.typ"] # Glob patterns for files to inc rheo.toml files must include a version field that matches the rheo CLI version. -- **Required field**: Every rheo.toml must have `version = "0.1.1"` (quoted string) +- **Required field**: Every rheo.toml must have `version = "0.1.2"` (quoted string) - **Semantic versioning**: Uses full semver format (major.minor.patch) - **Exact match required**: rheo warns if config version doesn't match CLI version -- **Current version**: 0.1.1 +- **Current version**: 0.1.2 - **When to bump**: Manifest version now tracks the CLI version (bumped with each release) **Error handling:** - **Missing version**: Error at config load time with message to add version field -- **Invalid version**: Error with explanation of expected semver format (must be quoted string like "0.1.1") +- **Invalid version**: Error with explanation of expected semver format (must be quoted string like "0.1.2") - **Version mismatch**: Warning (non-fatal) suggesting rheo.toml version update ### Default Behavior Without rheo.toml diff --git a/Cargo.lock b/Cargo.lock index d3d52f2..a3145cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2900,7 +2900,7 @@ dependencies = [ [[package]] name = "rheo" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "atty", diff --git a/Cargo.toml b/Cargo.toml index 9d4df4f..b8e96a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rheo" -version = "0.1.1" +version = "0.1.2" edition = "2024" authors = ["Lachlan Kermode "] description = "A typesetting and static site engine based on Typst" diff --git a/docs/new-releases.md b/docs/new-releases.md new file mode 100644 index 0000000..e318cf0 --- /dev/null +++ b/docs/new-releases.md @@ -0,0 +1,39 @@ +# Releasing a new version of rheo + +We aim to cut a release roughly every two weeks, whenever there are meaningful new features or fixes to ship. + +## Steps to cut a release + +1. **Update the version in `Cargo.toml`** to the new version number (e.g. `0.2.0`). + +2. **Create a pull request** targeting `main`: + - The PR title **must** be the version tag, e.g. `v0.2.0`. + - Add the **`release`** label to the PR. + +3. **Pre-release CI runs automatically** (`.github/workflows/pre-release.yml`): + - Builds (and tests where possible) on all 6 supported platforms: + - `x86_64-unknown-linux-gnu` + - `aarch64-unknown-linux-gnu` + - `x86_64-apple-darwin` + - `aarch64-apple-darwin` + - `x86_64-pc-windows-msvc` + - `aarch64-pc-windows-msvc` + - Validates the PR title matches `vX.Y.Z`. + - Runs `cargo publish --workspace --dry-run` to verify crates.io readiness. + +4. **Merge the PR** once CI is green and the changes are reviewed. + +## What happens on merge + +The release workflow (`.github/workflows/release.yml`) triggers automatically when a PR with the `release` label is merged to `main`. It runs three jobs in sequence: + +1. **build-artifacts** — Compiles release binaries (`cargo build --locked --release`) for all 6 platforms and uploads them as workflow artifacts. + +2. **publish-crates** — Publishes the crate to crates.io (`cargo publish --workspace`) and creates a git tag matching the PR title (e.g. `v0.2.0`) on the merge commit. + +3. **publish-artifacts** — Creates a GitHub Release tagged with the version. Release notes are auto-generated from merged PR titles since the last release. Platform zip files (`rheo-{target}.zip`) are attached as release assets. + +## After the release + +- Review the auto-generated release notes on the GitHub Releases page and edit if needed. +- Verify the crate is live on [crates.io/crates/rheo](https://crates.io/crates/rheo). diff --git a/examples/blog_site/rheo.toml b/examples/blog_site/rheo.toml index e1ad28a..1a4d8ab 100644 --- a/examples/blog_site/rheo.toml +++ b/examples/blog_site/rheo.toml @@ -1,4 +1,4 @@ -version = "0.1.1" +version = "0.1.2" # Relative to the rheo folder, if you specify a `oontent_dir`, # all of the `exclude` patterns become relative to this folder.