Skip to content

Commit

Permalink
Add rooster release management configuration and instructions (#8567)
Browse files Browse the repository at this point in the history
I'd rather not be the only one who can easily generate our changelog
entries so I invested some time to get Rooster a bit further along and
add instructions.
  • Loading branch information
zanieb committed Nov 8, 2023
1 parent 3ebaca5 commit fe9727a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 33 deletions.
29 changes: 0 additions & 29 deletions .github/release.yml

This file was deleted.

21 changes: 17 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,18 @@ even patch releases may contain [non-backwards-compatible changes](https://semve

### Creating a new release

1. Update the version with `rg 0.0.269 --files-with-matches | xargs sed -i 's/0.0.269/0.0.270/g'`
1. Update `BREAKING_CHANGES.md`
1. Create a PR with the version and `BREAKING_CHANGES.md` updated
We use an experimental in-house tool for managing releases.

1. Install `rooster`: `pip install git+https://github.com/zanieb/rooster@main`
1. Run `rooster release`; this command will:
- Generate a changelog entry in `CHANGELOG.md`
- Update versions in `pyproject.toml` and `Cargo.toml`
- Update references to versions in the `README.md` and documentation
1. The changelog should then be editorialized for consistency
- Often labels will be missing from pull requests they will need to be manually organized into the proper section
- Changes should be edited to be user-facing descriptions, avoiding internal details
1. Highlight any breaking changes in `BREAKING_CHANGES.md`
1. Create a pull request with the changelog and version updates
1. Merge the PR
1. Run the release workflow with the version number (without starting `v`) as input. Make sure
main has your merged PR as last commit
Expand All @@ -330,7 +339,11 @@ even patch releases may contain [non-backwards-compatible changes](https://semve
1. Attach artifacts to draft GitHub release
1. Trigger downstream repositories. This can fail non-catastrophically, as we can run any
downstream jobs manually if needed.
1. Create release notes in GitHub UI and promote from draft.
1. Publish the GitHub release
1. Open the draft release in the GitHub release section
1. Copy the changelog for the release into the GitHub release
- See previous releases for formatting of section headers
1. Generate the contributor list with `rooster contributors` and add to the release notes
1. If needed, [update the schemastore](https://github.com/charliermarsh/ruff/blob/main/scripts/update_schemastore.py)
1. If needed, update the `ruff-lsp` and `ruff-vscode` repositories.

Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,32 @@ force-exclude = '''
| crates/ruff_python_formatter/resources
)/
'''

[tool.rooster]
major_labels = [] # Ruff never uses the major version number
minor_labels = ["breaking"] # Bump the minor version on breaking changes

changelog_ignore_labels = ["internal"]

changelog_sections.breaking = "Breaking changes"
changelog_sections.preview = "Preview features"
changelog_sections.rule = "Rule changes"
changelog_sections.formatter = "Formatter"
changelog_sections.cli = "CLI"
changelog_sections.configuration = "Configuration"
changelog_sections.bug = "Bug fixes"
changelog_sections.__unknown__ = "Other changes"

# We exclude contributors from the CHANGELOG file
# Generate separately with `rooster contributors` for the GitHub release page
changelog_contributors = false

version_files = [
"README.md",
"docs/integrations.md",
"crates/flake8_to_ruff/Cargo.toml",
"crates/ruff_cli/Cargo.toml",
"crates/ruff_linter/Cargo.toml",
"crates/ruff_shrinking/Cargo.toml",
"scripts/benchmarks/pyproject.toml",
]

0 comments on commit fe9727a

Please sign in to comment.