Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 46 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: changelog

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

concurrency:
group: changelog-${{ github.ref }}
cancel-in-progress: true

jobs:
draft:
name: towncrier build --draft
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v7
- name: Draft the changelog
run: |
set -euo pipefail
# The draft heading needs a version; Cargo.toml holds the one a release cuts.
version=$(sed -n '0,/^version = /s/^version = "\(.*\)"$/\1/p' Cargo.toml)
test -n "$version"
uvx [email protected] build --draft --version "$version"
- name: A malformed fragment fails the draft
run: |
set -euo pipefail
version=$(sed -n '0,/^version = /s/^version = "\(.*\)"$/\1/p' Cargo.toml)
name=not-a-fragment.md
printf '%s\n' 'This name has no fragment type.' > "changelog.d/$name"
set +e
out=$(uvx [email protected] build --draft --version "$version" 2>&1)
code=$?
set -e
printf '%s\n' "$out"
rm -f "changelog.d/$name"
test "$code" -ne 0
printf '%s\n' "$out" | grep -F "Invalid news fragment name: $name"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project are documented here.

<!-- towncrier release notes start -->

## 0.7.4 - 2026-11-13

### Added
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Build heavy work on a remote builder when local compiles thrash the machine.
either a unit test or an integration test under `tests/`
- Known maintainer-bump regressions live in `tests/reproduce_real_prs.rs` and
must stay green (library **and** CLI auto-bump)
- Every pull request adds a news fragment, `changelog.d/+<topic>.<type>.md`
with type `feature`, `bugfix`, `doc`, `removal` or `misc`;
`towncrier build --draft --version X.Y.Z` shows how it renders

## Documentation

Expand Down Expand Up @@ -84,7 +87,8 @@ Keep these in lockstep on every release:
2. `pyproject.toml` `version` and `server.json` (both `version` fields)
3. `CITATION.cff` `version`
4. `docs/source/conf.py` `release`
5. `CHANGELOG.md`: move Unreleased notes into `## X.Y.Z - YYYY-MM-DD`
5. `CHANGELOG.md`: `towncrier build --version X.Y.Z` turns the fragments in
`changelog.d/` into `## X.Y.Z - YYYY-MM-DD`
6. `CITATION.cff`: add `date-released` when the version is published
7. The version a recorded command prints: `README.md`, this file,
`docs/orgmode/index.org` (the install section), `docs/orgmode/install.org`,
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+towncrier.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
News fragments in `changelog.d/`, assembled into `CHANGELOG.md` by towncrier at release, as in the other stackhands repositories.
Empty file added changelog.d/.gitkeep
Empty file.
37 changes: 37 additions & 0 deletions towncrier.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tool.towncrier]
name = "eb-stack"
directory = "changelog.d"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
title_format = "## {version} - {project_date}"
issue_format = "[#{issue}](https://github.com/stackhands/eb-stack/pull/{issue})"
underlines = ["", "", ""]
# Setting ignore, even to nothing, is what makes `towncrier build` fail a
# fragment whose name has no configured type. Unset, that file is skipped
# and the draft still passes. .gitkeep stays ignored either way.
ignore = []

[[tool.towncrier.type]]
directory = "feature"
name = "Added"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "Fixed"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "removal"
name = "Removed"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "Changed"
showcontent = true
Loading