Create bevy_platform::cfg
for viral feature management
#27415
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Action on PR labeled | |
# This workflow has write permissions on the repo | |
# It must not checkout a PR and run untrusted code | |
on: | |
pull_request_target: | |
types: | |
- labeled | |
permissions: | |
pull-requests: 'write' | |
jobs: | |
comment-on-migration-guide-label: | |
runs-on: ubuntu-latest | |
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**. | |
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.` | |
}) |