Add basic release content tagging workflow (#18568)
# Objective This PR begins integrating the new releate-content drafting process (https://github.com/bevyengine/bevy/pull/18427) into our GitHub workflows. It's similar to what we had before: Messages are posted to PRs tagged with `M-Needs-Release-Note` or `M-Needs-Migration-Guide` asking them to add the required material and linking to the instructions. These messages do not trigger if the PR already has modified files in the `release-notes` or `migration-guides` directories (respectively). I have also re-arranged and content slightly (to remove the need for a directory with the current version number), tweaked the language, and switched the templates to use the [standard markdown frontmatter format](https://jekyllrb.com/docs/front-matter/). ## Reviewer Questions + Do we want to add a CI rule actually requiring tagged PRs to create/modify files in the correct directories, or is the message prompt enough? + Do we want to add a CI rule to lint the metadata, for example to enforce that the PR number is included in the files it modifies?
This commit is contained in:
parent
0d90da896b
commit
0a2e183476
54
.github/workflows/action-on-PR-labeled.yml
vendored
54
.github/workflows/action-on-PR-labeled.yml
vendored
@ -12,19 +12,63 @@ permissions:
|
||||
pull-requests: 'write'
|
||||
|
||||
jobs:
|
||||
comment-on-breaking-change-label:
|
||||
comment-on-migration-guide-label:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'M-Needs-Migration-Guide' && !contains(github.event.pull_request.body, '## Migration Guide')
|
||||
if: github.event.label.name == 'M-Needs-Migration-Guide'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 2
|
||||
- name: Get changes
|
||||
id: get_changes
|
||||
shell: bash {0}
|
||||
run: |
|
||||
git fetch --depth=1 origin $BASE_SHA
|
||||
git diff --exit-code $BASE_SHA $HEAD_SHA -- ./release-content/migration-guides
|
||||
echo "found_changes=$?" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/github-script@v7
|
||||
if: steps.get_changes.outputs.found_changes == '0'
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `It looks like your PR is a breaking change, but you didn't provide a migration guide.
|
||||
body: `It looks like your PR is a breaking change, but **you didn't provide a migration guide**.
|
||||
|
||||
Could you add some context on what users should update when this change get released in a new version of Bevy?
|
||||
It will be used to help writing the migration guide for the version. Putting it after a \`## Migration Guide\` will help it get automatically picked up by our tooling.`
|
||||
Please review the [instructions for writing migration guides](https://github.com/bevyengine/bevy/tree/main/release-content/migration_guides.md), then expand or revise the content in the [migration guides directory](https://github.com/bevyengine/bevy/tree/main/release-content/migration-guides) to reflect your changes.`
|
||||
})
|
||||
comment-on-release-note-label:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name == 'M-Needs-Release-Note'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 2
|
||||
- name: Get changes
|
||||
id: get_changes
|
||||
shell: bash {0}
|
||||
run: |
|
||||
git fetch --depth=1 origin $BASE_SHA
|
||||
git diff --exit-code $BASE_SHA $HEAD_SHA -- ./release-content/release-notes
|
||||
echo "found_changes=$?" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: actions/github-script@v7
|
||||
if: steps.get_changes.outputs.found_changes == '0'
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `It looks like your PR has been selected for a highlight in the next release blog post, but **you didn't provide a release note**.
|
||||
|
||||
Please review the [instructions for writing release notes](https://github.com/bevyengine/bevy/tree/main/release-content/release_notes.md), then expand or revise the content in the [release notes directory](https://github.com/bevyengine/bevy/tree/main/release-content/release_notes) to showcase your changes.`
|
||||
})
|
||||
|
3
release-content/README.md
Normal file
3
release-content/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Release Content
|
||||
|
||||
This directory contains drafts of documentation for the current development cycle, which will be published to the website during the next release. You can find more information in the [release notes](./release_notes.md) and [migration guide](./migration_guide.md) files.
|
0
release-content/migration-guides/.gitkeep
Normal file
0
release-content/migration-guides/.gitkeep
Normal file
@ -11,14 +11,15 @@ Bevy asks authors (and reviewers) to write a draft migration guide as part of th
|
||||
## Where to put your migration guides
|
||||
|
||||
Each major Bevy version (e.g. 0.12, or 2.0) will get its own migration guide.
|
||||
The draft migration guides are organized into a folder of the same name inside of `bevyengine/bevy/working-migration-guides`.
|
||||
The draft migration guides for the current cycle are organized in the `bevyengine/bevy/release-content/migration-guides` folder.
|
||||
|
||||
When we publish our first release candidate for a cycle, these notes are moved from `bevyengine/bevy`, and into `bevyengine/bevy-website`,
|
||||
When we publish our first release candidate for a cycle, these notes are merged together and moved from `bevyengine/bevy` into `bevyengine/bevy-website`,
|
||||
where they will receive a final editing pass.
|
||||
|
||||
## What to put in your draft migration guide
|
||||
If your PR introduces a new breaking change relative to the previous version, you should start a new guide by copying [the template](./migration_guides_template.md) into a new file in the `migration-guides` folder.
|
||||
You should also update the existing migration guides in the other files, if your change effects them.
|
||||
|
||||
A `template.md` file is provided in `bevyengine/bevy/working-migration-guides`: copy-paste that to get started!
|
||||
## What to put in your draft migration guide
|
||||
|
||||
Migration guides are intended to briefly communicate:
|
||||
|
30
release-content/migration_guides_template.md
Normal file
30
release-content/migration_guides_template.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
title: Feature that broke
|
||||
pull_requests: [14791, 15458, 15269]
|
||||
---
|
||||
|
||||
Copy the contents of this file into a new file in `./migration-guides`, update the metadata, and add migration guide content here.
|
||||
|
||||
## Goals
|
||||
|
||||
Aim to communicate:
|
||||
|
||||
- What has changed since the last release?
|
||||
- Why did we make this breaking change?
|
||||
- How can users migrate their existing code?
|
||||
|
||||
## Style Guide
|
||||
|
||||
Keep it short and sweet:
|
||||
|
||||
- Use bullet points and make sure it's searchable.
|
||||
- Avoid headings. If you must, use only level-two headings.
|
||||
- Use backticks for types (e.g. `Vec<T>`) in either the title or the body.
|
||||
- Diff codeblocks can also be useful for succinctly communicating changes.
|
||||
|
||||
```diff
|
||||
fn my_system(world: &mut World) {
|
||||
+ world.new_method();
|
||||
- world.old_method();
|
||||
}
|
||||
```
|
0
release-content/release-notes/.gitkeep
Normal file
0
release-content/release-notes/.gitkeep
Normal file
@ -11,14 +11,14 @@ Bevy asks authors (and reviewers) to write draft release notes as part of the pu
|
||||
## Where to put your release notes
|
||||
|
||||
Each major Bevy version (e.g. 0.12, or 2.0) will get its own set of release notes.
|
||||
The draft release notes are organized into a folder of the same name inside of `bevyengine/bevy/working-release-notes`.
|
||||
The draft release notes are organized in the `bevyengine/bevy/release-content/release-notes` folder.
|
||||
|
||||
When we publish our first release candidate for a cycle, these notes are moved from `bevyengine/bevy`, and into `bevyengine/bevy-website`,
|
||||
When we publish our first release candidate for a cycle, these notes are merged together and moved from `bevyengine/bevy` into `bevyengine/bevy-website`,
|
||||
where they will receive a final editing pass and any multimedia.
|
||||
|
||||
## What to put in your draft release notes
|
||||
To start a new release note, copy-paste [the template](./release_notes_template.md) into a new file in the `release-notes` folder.
|
||||
|
||||
A `template.md` file is provided in `bevyengine/bevy/working-release-notes`: copy-paste that to get started!
|
||||
## What to put in your draft release notes
|
||||
|
||||
Release notes are intended to capture the essence of:
|
||||
|
19
release-content/release_notes_template.md
Normal file
19
release-content/release_notes_template.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
title: Feature name
|
||||
authors: ["@FerrisTheCrab", "@BirdObsessed"]
|
||||
pull_requests: [14791, 15458, 15269]
|
||||
---
|
||||
|
||||
Copy the contents of this file into `./release-notes`, update the metadata, and add release note content here.
|
||||
|
||||
## Goals
|
||||
|
||||
Answer the following:
|
||||
|
||||
- What has been changed or added?
|
||||
- Why is this a big deal for users?
|
||||
- How can they use it?
|
||||
|
||||
## Style Guide
|
||||
|
||||
You may use markdown headings levels two and three, and must not start with a heading. Prose is appreciated, but bullet points are acceptable. Copying the introduction from your PR is often a good place to start.
|
@ -1,9 +0,0 @@
|
||||
# Feature that broke (remember to update the file name)
|
||||
|
||||
prs = [14791, 15458, 15269]
|
||||
|
||||
Add migration guide content here. Use bullet points, make sure it's searchable. Briefly communicate:
|
||||
|
||||
- what has changed since the last release?
|
||||
- why did we make this breaking change?
|
||||
- how can users migrate their existing code?
|
@ -1,11 +0,0 @@
|
||||
# Feature Name (remember to update the file name to match)
|
||||
|
||||
authors = ["@FerrisTheCrab", "@BirdObsessed"]
|
||||
contributors = ["@HelpfulHelper"]
|
||||
prs = [14791, 15458, 15269]
|
||||
|
||||
Add release note content here. Answer:
|
||||
|
||||
- what has been changed or added?
|
||||
- why is this a big deal for users?
|
||||
- how can they use it?
|
Loading…
Reference in New Issue
Block a user