- 
                Notifications
    
You must be signed in to change notification settings  - Fork 402
 
          Improve generate-release workflow involving editing and merging notes and guides
          #1650
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
bba6512
              9187ec8
              f5fcedf
              78167bc
              10734eb
              a30354a
              df015ec
              230332f
              798fa92
              442b6b2
              1165ae2
              b3ab7b1
              2e431d1
              2a40fe6
              d43a401
              f2dd720
              0555cae
              fe65eb4
              ab78cc7
              76b8aa7
              763905d
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,12 +4,14 @@ This CLI tool is used to generate all the skeleton files required to create a ne | |
| 
     | 
||
| For a bit more background see this issue: <https://github.com/bevyengine/bevy-website/issues/1163> | ||
| 
     | 
||
| All commands assume they are ran in the `/generate-release` folder. | ||
| The commands can be run from anywhere inside the workspace folder. | ||
                
       | 
||
| 
     | 
||
| Each command will generate files in the `/release-content/{release-version}` folder. The `release-version` is an argument to all commands. | ||
| 
     | 
||
| Each command have a `--from` and `--to` argument. You can pass it a Git branch, tag, or commit. | ||
| 
     | 
||
| To create issues for the `release-notes` subcommand, you need to pass the `--create-issues` flag, otherwise it performs a dry-run that does not have lasting consequences. This should probably only be done for the initial run, after a regular dry-run has been done to confirm the tool is working as expected. | ||
| 
     | 
||
| Before running the command, you'll need to generate a GitHub API token at <https://github.com/settings/tokens>. It's easier to use classic tokens. | ||
| The token must have `repo` permissions to be able to open issues (and PRs) on your behalf. | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -22,16 +24,18 @@ GITHUB_TOKEN=token_string_copied_from_github | |
| Here's an example for the commands used to generate the `0.14` release: | ||
| 
     | 
||
| ```shell | ||
| cargo run -- --from v0.13.0 --to main --release-version 0.14 migration-guides | ||
| cargo run -- --from v0.13.0 --to main --release-version 0.14 release-notes | ||
| cargo run -- --from v0.13.0 --to main --release-version 0.14 changelog | ||
| cargo run -- --from v0.13.0 --to main --release-version 0.14 contributors | ||
| cargo run -p generate-release -- --from v0.13.0 --to main --release-version 0.14 migration-guides | ||
| cargo run -p generate-release -- --from v0.13.0 --to main --release-version 0.14 release-notes | ||
| cargo run -p generate-release -- --from v0.13.0 --to main --release-version 0.14 changelog | ||
| cargo run -p generate-release -- --from v0.13.0 --to main --release-version 0.14 contributors | ||
| ``` | ||
| 
     | 
||
| ## Generating a release | ||
| 
     | 
||
| To generate a release from scratch, run all these commands then add the new migration guide and blog post to their respective `/content` folder. When doing so, it's important to use the `public_draft` feature to hide those pages until the day of the release. For the `public_draft` feature, you'll need to provide it a GitHub issue number, it's recommended to point it to an issue tracker for the current release being worked on. The issue needs to be on the `bevy-website` repo. | ||
| 
     | 
||
| When you're merging, or editing, notes and guides, keep in mind that this tool will not regenerate notes or guides that still have a PR number in any note or guide's metadata, contained in the `_<release_notes|migration_guides>.toml`. This means to merge multiple PRs into one note or guide you simply remove one `[[release_notes]]` or `[[guides]]` entry, and move it's PR number to the merged entry that is the sum of all the merged PRs. For editing, this means the other metadata will also not be regenerated if the PR number still exists in the metadata. | ||
                
      
                  TrialDragon marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
                
      
                  TrialDragon marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| The following sections go in more details on each parts of the process. | ||
| 
     | 
||
| ### Migration Guides | ||
| 
          
            
          
           | 
    @@ -74,9 +78,14 @@ Once all those files are generated you'll need to create a new blog post in `/co | |
| 
     | 
||
| ```markdown | ||
| +++ | ||
| title = "Bevy 0.14" | ||
| date = 2024-05-17 | ||
| # Let X be the major version, and y the minor version. | ||
| # Change the Bevy release versions below to match this one! | ||
| title = "Bevy X.y" | ||
| # Insert a year in the year, month, day format. | ||
                
      
                  TrialDragon marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| date = YYYY-MM-DD | ||
| [extra] | ||
| # GitHub issue number for tracking this release's | ||
| # news post. | ||
                
      
                  TrialDragon marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| public_draft = _release tracking issue number_ | ||
| +++ | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -96,3 +105,6 @@ public_draft = _release tracking issue number_ | |
| ``` | ||
| 
     | 
||
| The most important part of this is the `release_notes`, `changelog`, and `contributors` shortcodes. `release_notes` will get the list of release notes from the `_release_notes.toml` file and combine all the separate file and add them to this file. `contributors()` will load the `contributors.toml` file and generate the necessary markup. `changelog()` will load the `changelog.toml` file and generate the necessary markup. | ||
| 
     | 
||
| > [!NOTE] | ||
| > The `contributors` field in `_release_notes.toml` is for all non-PR-author contributors to the PR; they should be added to the `authors` field on a case-by-case basis depending on level of involvement. | ||
Uh oh!
There was an error while loading. Please reload this page.