Ctrl K
ComunidadGuías…

knope.toml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Release automation for Podspine — knope (CHANGESETS model).
#
# Model: every user-facing change ships a `.changeset/*.md` fragment. Those
# fragments (not commit messages) drive BOTH the version bump and the
# changelog (full section control, no commit/fragment duplication).
# `knope document-change` scaffolds one; see the changeset section in
# CONTRIBUTING.md. Conventional-commit titles are still enforced
# (pr-title.yml) for a clean history, but they are ignored for release
# purposes.
#
# The two halves live in .github/workflows/knope-{prepare,release}.yml and are
# gated OFF behind the `KNOPE_ENABLED` repo variable until the flow is proven.
# knope only ORCHESTRATES (version PR + changelog + tag/GitHub Release); the signed
# build (release.yml) still runs on the pushed `v*` tag.

[package]
# Bump the workspace version; member crates inherit it via `version.workspace =
# true`. Anchored to line-start so it targets `[workspace.package] version =
# "X.Y.Z"` and NOT the `{ version = "..." }` dependency pins. VERIFY on enable
# that only the workspace version is rewritten.
versioned_files = [
  { path = "Cargo.toml", regex = '(?m)^version = "(?<version>\d+\.\d+\.\d+)"' },
]
changelog = "CHANGELOG.md"

extra_changelog_sections = [
  { name = "Security", types = ["security"] },
  { name = "Performance", types = ["perf"] },
]

[changes]
ignore_conventional_commits = true # fragments in .changeset/ are the sole source of truth

[github]
owner = "schubydoo"
repo = "podspine"

[release_notes]
change_templates = [
  "### $summary ([#$pr_number](https://github.com/schubydoo/podspine/pull/$pr_number))\n\n$details",
  "### $summary\n\n$details",
  "- $summary ([#$pr_number](https://github.com/schubydoo/podspine/pull/$pr_number))",
  "- $summary",
]

# --- prepare-release: open/refresh the `release` PR (run on push to main) -----
[[workflows]]
name = "prepare-release"

[[workflows.steps]]
type = "Command"
command = "git switch -C release"

[[workflows.steps]]
type = "PrepareRelease"

[[workflows.steps]]
type = "Command"
command = "cargo update --workspace" # resync Cargo.lock to the bumped version

[[workflows.steps]]
type = "Command"
command = 'git commit -am "chore: prepare release $version"'

[[workflows.steps]]
type = "Command"
command = "git push --force --set-upstream origin release"

[[workflows.steps]]
type = "CreatePullRequest"
base = "main"

[workflows.steps.title]
template = "chore: prepare release $version"

[workflows.steps.body]
template = "Merging this PR tags and publishes **v$version** — the signed `release.yml` build runs on the pushed tag.\n\nGenerated by knope from the `.changeset/*.md` fragments; don't hand-edit.\n\n---\n\n$changelog"

# --- release: create the tag + GitHub Release on merge of the release PR ------
[[workflows]]
name = "release"

[[workflows.steps]]
type = "Release"

# --- document-change: scaffold a new .changeset fragment (local convenience) --
# `knope document-change` walks you through creating a `.changeset/<slug>.md`.
[[workflows]]
name = "document-change"

[[workflows.steps]]
type = "CreateChangeFile"