Skip to content

Commit 9fad68c

Browse files
authored
Write guide on releasing the CLI (#447)
This proposes a process for releasing the CLI, based it off of the linter release guide. Some noticeable points: 1. Releasing the CLI requires Bevy engine maintainer approval. - This smooths migration for when the CLI becomes an official Bevy tool, since it will become required then. 2. The Github release description looks very similar [to the linter's](https://github.com/TheBevyFlock/bevy_cli/releases/tag/lint-v0.3.0). This is good for consistency, but may be confusing and hard to tell the difference between the two. Any ideas on how to differentiate them further?
1 parent 15ae483 commit 9fad68c

File tree

11 files changed

+119
-12
lines changed

11 files changed

+119
-12
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable user-facing changes to the **Bevy CLI** will be documented in this file.
4+
5+
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
6+
7+
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
8+
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
9+
10+
## Unreleased
11+
12+
**All Changes**: [`main`](https://github.com/TheBevyFlock/bevy_cli/commits/main)

MIGRATION.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Migration Guide
2+
3+
Occasionally changes are made to the **Bevy CLI** that may break existing projects, or majorly change how it is intended to be used. This document provides a guide recommending how to upgrade your existing project to a newer version of the CLI.
4+
5+
To actually install the new version of the CLI, please see [the docs] and [the releases page]. Note that some changes listed here are optional (and will be explicitly marked as such). If you ever run into issues while upgrading, please feel free to [submit an issue].
6+
7+
[the docs]: https://thebevyflock.github.io/bevy_cli/cli/index.html
8+
[the releases page]: https://github.com/TheBevyFlock/bevy_cli/releases
9+
[submit an issue]: https://github.com/TheBevyFlock/bevy_cli/issues
10+
11+
> **Note**
12+
>
13+
> This document is empty for now, and will be until v0.2.0 of the CLI is released with actual breaking changes. Check back later :)

bevy_lint/CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Changelog
22

3-
All notable user-facing changes to this project will be documented in this file.
3+
All notable user-facing changes to the **Bevy Linter** will be documented in this file.
44

55
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
66

77
[Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
88
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
99

10-
## [Unreleased]
10+
## Unreleased
1111

1212
**All Changes**: [`lint-v0.3.0...main`](https://github.com/TheBevyFlock/bevy_cli/compare/lint-v0.3.0...main)
1313

14-
## [v0.3.0] - 2025-04-30
14+
## v0.3.0 - 2025-04-30
1515

1616
**All Changes**: [`lint-v0.2.0...lint-v0.3.0`](https://github.com/TheBevyFlock/bevy_cli/compare/lint-v0.2.0...lint-v0.3.0)
1717

@@ -45,7 +45,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
4545
- The goal of the lint is to encourage the `AppExit` to be handled, although returning it from `main()` is just one solution. This fix prevents the lint from yelling at you if you choose to handle it a different way, or simply choose to discard it with `let _ = app.run();`.
4646
- Fixed the Rust version in the compatibility table for v0.2.0 ([#363](https://github.com/TheBevyFlock/bevy_cli/pull/363))
4747

48-
## [v0.2.0] - 2025-03-19
48+
## v0.2.0 - 2025-03-19
4949

5050
**All Changes**: [`lint-v0.1.0...lint-v0.2.0`](https://github.com/TheBevyFlock/bevy_cli/compare/lint-v0.1.0...lint-v0.2.0)
5151

@@ -72,9 +72,9 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
7272
- `rustc_driver.dll` not found on Windows ([#281](https://github.com/TheBevyFlock/bevy_cli/pull/281))
7373
- `bevy_lint` should now work on Windows, as it was previously broken by this bug.
7474

75-
## [v0.1.0] - 2024-11-17
75+
## v0.1.0 - 2024-11-17
7676

77-
**All Changes**: [`17834eb...lint-v0.1.0`](https://github.com/TheBevyFlock/bevy_cli/compare/17834eb...lint-v0.1.0)
77+
**All Changes**: [`lint-v0.1.0`](https://github.com/TheBevyFlock/bevy_cli/commits/lint-v0.1.0)
7878

7979
### Added
8080

bevy_lint/MIGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Migration Guide
22

3-
Occasionally, changes are made to `bevy_lint` that may break existing projects, or majorly changes how it is intended to be used. This document provides a guide recommending how to upgrade your existing project to a newer version of the linter.
3+
Occasionally changes are made to the **Bevy Linter** that may break existing projects, or majorly change how it is intended to be used. This document provides a guide recommending how to upgrade your existing project to a newer version of the linter.
44

55
To actually install the new version of the linter, please see [the docs] and [the releases page]. Note that some changes listed here are optional (and will be explicitly marked as such). If you ever run into issues while upgrading, please feel free to [submit an issue].
66

@@ -16,7 +16,7 @@ The linter now supports Bevy 0.16, but no longer supports Bevy 0.15. You may sti
1616

1717
To migrate your code base to Bevy 0.16, please see the [release post][bevy 0.16 release post] and [migration guide][bevy 0.16 migration guide].
1818

19-
[bevy 0.16 release post]: TODO
19+
[bevy 0.16 release post]: https://bevyengine.org/news/bevy-0-16/
2020
[bevy 0.16 migration guide]: https://bevyengine.org/learn/migration-guides/0-15-to-0-16/
2121

2222
### [Bumped Nightly Toolchain to `nightly-2025-04-03`](https://github.com/TheBevyFlock/bevy_cli/pull/278)

docs/src/SUMMARY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
- [Configuration](cli/configuration.md)
1515
- [Configuration Reference](cli/configuration/reference.md)
1616
- [Troubleshooting](cli/troubleshooting.md)
17+
- [Changelog](cli/changelog.md)
18+
- [Migration Guide](cli/migration.md)
1719

1820
# Linter User Guide
1921

@@ -26,11 +28,15 @@
2628
- [Toggling Lints in Code](linter/usage/toggling-lints-code.md)
2729
- [Compatibility](linter/compatibility.md)
2830
- [Github Actions](linter/github-actions.md)
31+
- [Changelog](linter/changelog.md)
32+
- [Migration Guide](linter/migration.md)
2933

3034
---
3135

3236
# CLI Contributor's Guide
3337

38+
- [How to Release the CLI](contribute/cli/release.md)
39+
3440
# Linter Contributor's Guide
3541

3642
- [About](contribute/linter/index.md)

docs/src/cli/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#include ../../../CHANGELOG.md}}

docs/src/cli/migration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#include ../../../MIGRATION.md}}

docs/src/contribute/cli/release.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# How to Release the CLI
2+
3+
## Kick-off Pull Request
4+
5+
1. Review the changelog (`CHANGELOG.md`) and ensure that all notable changes have been documented.
6+
2. Replace `[Unreleased]` heading with the version with the format `[vX.Y.Z] - YYYY-MM-DD`.
7+
3. Update the `**All Changes**` link to compare from `main` to the new tag `cli-vX.Y.Z`. (E.g. `cli-v0.1.0...main` to `cli-v0.1.0...cli-v0.2.0`.)
8+
4. Review the migration guide (`MIGRATION.md`) and ensure all breaking / significant changes from the previous version are documented.
9+
5. Remove the `-dev` suffix from the version in `Cargo.toml`.
10+
- Please ensure that `Cargo.lock` also updates!
11+
6. Commit your changes and open a pull request.
12+
7. Merge the PR once a core Bevy maintainer approves it with no outstanding issues from other contributors.
13+
- This starts the release process, enacting a freeze on all other changes until the release has finished. While maintainers need to be aware of this so they do not merge PRs during this time, the release process should take less than an hour, so it's unlikely to ever be an issue.
14+
15+
## Release on Github
16+
17+
1. [Create a new Github release](https://github.com/TheBevyFlock/bevy_cli/releases/new).
18+
2. Set the tag to `cli-vX.Y.Z`.
19+
3. Set the title to `` `bevy_cli` - vX.Y.Z``.
20+
4. Paste and fill out the following template into the release documentation:
21+
22+
````markdown
23+
<!-- One-sentence summary of changes. What awesome features can we spotlight? What critical bugs were fixed? -->
24+
25+
You can find the live documentation for this release [here](https://thebevyflock.github.io/bevy_cli/cli/index.html). You may also be interested in [the changelog] and [the migration guide].
26+
27+
<!-- Make sure to update the tags in these links to point to the correct version. -->
28+
29+
[the changelog]: https://github.com/TheBevyFlock/bevy_cli/blob/cli-vX.Y.Z/CHANGELOG.md
30+
[the migration guide]: https://github.com/TheBevyFlock/bevy_cli/blob/cli-vX.Y.Z/MIGRATION.md
31+
32+
> [!WARNING]
33+
>
34+
> This is an unofficial community project, hacked upon by the Bevy CLI working group until it is eventually upstreamed into the main [Bevy Engine organization](https://github.com/bevyengine). Pardon our rough edges, and please consider [submitting an issue](https://github.com/TheBevyFlock/bevy_cli/issues) if you run into trouble!
35+
36+
You can install the precompiled CLI using `cargo-binstall`:
37+
38+
<!-- Update `X.Y.Z` with the correct version. -->
39+
40+
```sh
41+
cargo binstall --git https://github.com/TheBevyFlock/bevy_cli --version X.Y.Z --locked bevy_cli
42+
```
43+
44+
You may also compile the CLI yourself with `cargo install`:
45+
46+
<!-- Update `cli-vX.Y.Z` with the correct tag. -->
47+
48+
```sh
49+
cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-vX.Y.Z --locked bevy_cli
50+
```
51+
````
52+
53+
5. Check the pre-release box if this is an alpha release, then click "Save draft".
54+
6. [Run the "Build CLI" workflow](https://github.com/TheBevyFlock/bevy_cli/actions/workflows/build-cli.yml), and make sure to check the "Upload to release" box.
55+
7. Ensure that the workflow has successfully uploaded all executables to the draft release, then press "Publish release"!
56+
8. Announce the release on Discord and other social medias. Congrats!
57+
58+
## Post-Release
59+
60+
1. Add a new unreleased section to the top of the changelog (`CHANGELOG.md`) from the following template:
61+
62+
```markdown
63+
## [Unreleased]
64+
65+
<!-- Update `cli-vX.Y.Z` in the link to point to the latest release tag. -->
66+
67+
**All Changes**: [`cli-vX.Y.Z...main`](https://github.com/TheBevyFlock/bevy_cli/compare/cli-vX.Y.Z...main)
68+
```
69+
70+
2. Bump the version in `Cargo.toml` to the next `-dev` version, and ensure `Cargo.lock` also updates.
71+
3. Commit your changes and open a pull request.
72+
4. Merge the PR once it has been approved, unblocking the feature freeze.

docs/src/contribute/linter/how-to/release.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Kick-off Pull Request
44

5-
1. Review the changelog (`CHANGELOG.md`) and ensure that all notable changes have been documented.
5+
1. Review the changelog (`bevy_lint/CHANGELOG.md`) and ensure that all notable changes have been documented.
66
2. Replace `[Unreleased]` heading with the version with the format `[vX.Y.Z] - YYYY-MM-DD`.
77
3. Update the `**All Changes**` link to compare from `main` to the new tag `lint-vX.Y.Z`. (E.g. `lint-v0.1.0...main` to `lint-v0.1.0...lint-v0.2.0`.)
8-
4. Review the migration guide (`MIGRATION.md`) and ensure all breaking / significant changes from the previous version are documented.
9-
5. Remove the `-dev` suffix from the version in `Cargo.toml` and the compatibility table in `README.md`.
8+
4. Review the migration guide (`bevy_lint/MIGRATION.md`) and ensure all breaking / significant changes from the previous version are documented.
9+
5. Remove the `-dev` suffix from the version in `Cargo.toml` and the compatibility table in `bevy_lint/README.md`.
1010
- Please ensure that `Cargo.lock` also updates!
1111
6. Replace `--branch main` in `action.yml` with `--tag lint-vX.Y.Z`.
1212
- The `linter-action.yml` workflow may fail as the tag does not exist yet. This is fine!
@@ -61,7 +61,7 @@ rustup run nightly-YYYY-MM-DD cargo install \
6161

6262
## Post-Release
6363

64-
1. Add a new unreleased section to the top of the changelog (`CHANGELOG.md`) from the following template:
64+
1. Add a new unreleased section to the top of the changelog (`bevy_lint/CHANGELOG.md`) from the following template:
6565

6666
```markdown
6767
## [Unreleased]

docs/src/linter/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#include ../../../bevy_lint/CHANGELOG.md}}

0 commit comments

Comments
 (0)