bevy/.github/workflows/post-release.yml

59 lines
2.1 KiB
YAML
Raw Normal View History

Fix release workflow (#4903) # Objective While playing with the code, I found some problems in the recently merged version-bumping workflow: - Most importantly, now that we are using `0.8.0-dev` in development, the workflow will try to bump it to `0.9.0` :sob: - The crate filter is outdated now that we have more crates in `tools`. - We are using `bevy@users.noreply.github.com`, but according to [Github help](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#about-commit-email-addresses), that email address means "old no-reply email format for the user `bevy`". It is currently not associated with any account, but I feel this is still not appropriate here. ## Solution - Create a new workflow, `Post-release version bump`, that should be run after a release and bumps version from `0.X.0` to `0.X+1.0-dev`. Unfortunately, cargo-release doesn't have a builtin way to do this, so we need to parse and increment the version manually. - Add the new crates in `tools` to exclusion list. Also removes the dependency version specifier from `bevy_ecs_compile_fail_tests`. It is not in the workspace so the dependency version will not get automatically updated by cargo-release. - Change the author email to `41898282+github-actions[bot]@users.noreply.github.com`. According to the discussion [here](https://github.com/actions/checkout/issues/13#issuecomment-724415212) and [here](https://github.community/t/github-actions-bot-email-address/17204/6), this is the email address associated with the github-actions bot account. - Also add the workflows to our release checklist. See infmagic2047#5 and infmagic2047#6 for examples of release and post-release PRs.
2022-06-06 15:47:51 +00:00
name: Post-release version bump
# how to trigger: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install cargo-release
run: cargo install cargo-release
- name: Setup post-release version bump
run: |
# Set the commit author to the github-actions bot. See discussion here for more information:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# https://github.community/t/github-actions-bot-email-address/17204/6
git config user.name 'Bevy Auto Releaser'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
# Read the current version from Cargo.toml
current_version=$(cargo metadata --format-version 1 --no-deps | \
jq --raw-output '.packages | .[] | select(.name == "bevy").version')
# Sanity check: current version should be 0.X.Y
if ! grep -q '^0\.[0-9]\+\.[0-9]\+$' <<< "${current_version}"; then
echo "Invalid version (not in 0.X.Y format): ${current_version}"
exit 1
fi
minor_version=$(sed 's/^0\.\([0-9]\+\).*/\1/' <<< "${current_version}")
next_version=0.$((minor_version + 1)).0-dev
echo "Bumping version to ${next_version}"
# See release.yml for meaning of these arguments
cargo release "${next_version}" \
--workspace \
--no-publish \
--execute \
--no-tag \
--no-confirm \
--no-push \
--exclude ci \
--exclude errors \
--exclude bevy-ios-example \
--exclude build-wasm-example
- name: Create PR
Bump peter-evans/create-pull-request from 3 to 4 (#4940) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's releases</a>.</em></p> <blockquote> <h2>Create Pull Request v4.0.0</h2> <h2>Breaking changes</h2> <ul> <li>The <code>add-paths</code> input no longer accepts <code>-A</code> as a valid value. When committing all new and modified files the <code>add-paths</code> input should be omitted.</li> <li>If using self-hosted runners or GitHub Enterprise Server, there are minimum requirements for <code>v4</code> to run. See &quot;What's new&quot; below for details.</li> </ul> <h2>What's new</h2> <ul> <li>Updated runtime to Node.js 16 <ul> <li>The action now requires a minimum version of v2.285.0 for the <a href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions Runner</a>.</li> <li>If using GitHub Enterprise Server, the action requires <a href="https://docs.github.com/en/enterprise-server@3.4/admin/release-notes">GHES 3.4</a> or later.</li> </ul> </li> </ul> <h2>What's Changed</h2> <ul> <li>README.md: Add word &quot;permissions&quot; to part on GITHUB_TOKEN by <a href="https://github.com/hartwork"><code>@​hartwork</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1082">peter-evans/create-pull-request#1082</a></li> <li>docs: Document how to improve close-and-reopen user experience by <a href="https://github.com/hartwork"><code>@​hartwork</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1084">peter-evans/create-pull-request#1084</a></li> <li>README.md: Skip follow-up steps if there is no pull request by <a href="https://github.com/hartwork"><code>@​hartwork</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1083">peter-evans/create-pull-request#1083</a></li> <li>v4 by <a href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1099">peter-evans/create-pull-request#1099</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/hartwork"><code>@​hartwork</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1082">peter-evans/create-pull-request#1082</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/peter-evans/create-pull-request/compare/v3.14.0...v4.0.0">https://github.com/peter-evans/create-pull-request/compare/v3.14.0...v4.0.0</a></p> <h2>Create Pull Request v3.14.0</h2> <p>This release reverts a commit made to bump the runtime to node 16. It inadvertently caused <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1077">an issue</a> for users on GitHub Enterprise. Apologies. 🙇‍♂️</p> <h2>What's Changed</h2> <ul> <li>feat: revert update action runtime to node 16 by <a href="https://github.com/peter-evans"><code>@​peter-evans</code></a> <a href="https://github.com/peter-evans/create-pull-request/commit/18f7dc018cc2cd597073088f7c7591b9d1c02672">https://github.com/peter-evans/create-pull-request/commit/18f7dc018cc2cd597073088f7c7591b9d1c02672</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/peter-evans/create-pull-request/compare/v3.13.0...v3.14.0">https://github.com/peter-evans/create-pull-request/compare/v3.13.0...v3.14.0</a></p> <h2>Create Pull Request v3.13.0</h2> <h2>What's Changed</h2> <ul> <li>Document that draft status changes are not reflected by <a href="https://github.com/willthames"><code>@​willthames</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1064">peter-evans/create-pull-request#1064</a></li> <li>fix: remove unused draft param from pull update by <a href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1065">peter-evans/create-pull-request#1065</a></li> <li>Update action runtime to node 16 by <a href="https://github.com/sibiraj-s"><code>@​sibiraj-s</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1074">peter-evans/create-pull-request#1074</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/willthames"><code>@​willthames</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1064">peter-evans/create-pull-request#1064</a></li> <li><a href="https://github.com/sibiraj-s"><code>@​sibiraj-s</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1074">peter-evans/create-pull-request#1074</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/peter-evans/create-pull-request/compare/v3.12.1...v3.13.0">https://github.com/peter-evans/create-pull-request/compare/v3.12.1...v3.13.0</a></p> <h2>Create Pull Request v3.12.1</h2> <h2>What's Changed</h2> <ul> <li>ci: remove workflow by <a href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1046">peter-evans/create-pull-request#1046</a></li> <li>fix: add '--' to checkout command to avoid ambiguity by <a href="https://github.com/kenji-miyake"><code>@​kenji-miyake</code></a> in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1051">peter-evans/create-pull-request#1051</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/kenji-miyake"><code>@​kenji-miyake</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/pull/1051">peter-evans/create-pull-request#1051</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/peter-evans/create-pull-request/commit/923ad837f191474af6b1721408744feb989a4c27"><code>923ad83</code></a> force tryFetch (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1189">#1189</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/f094b77505fb89581e68a1163fbd2fffece39da1"><code>f094b77</code></a> fix: avoid issue with case sensitivity of repo names (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1179">#1179</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/af7c021bb9c41362d0986422bd244ce51a3bf52f"><code>af7c021</code></a> docs: shorten quote</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/97872c48431b7ab039b31e504f8e0f73b5005127"><code>97872c4</code></a> docs: update GA quote/ref in concepts-guidelines.md (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1169">#1169</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/bd72e1b7922d417764d27d30768117ad7da78a0e"><code>bd72e1b</code></a> fix: use full name for head branch to allow for repo renaming (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1164">#1164</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/f1a7646cead32c950d90344a4fb5d4e926972a8f"><code>f1a7646</code></a> build: update distribution (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1157">#1157</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/15b68d176daae473d63f8e6dc64a3eb891e4239a"><code>15b68d1</code></a> fix: strip optional '.git' suffix from https server remote name. (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1153">#1153</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/0dfc93c1049996241252d9dc45a270b7c12dec6b"><code>0dfc93c</code></a> build(deps): bump peter-evans/create-pull-request from 3 to 4 (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1150">#1150</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/252fb19db2e7e1916698d4cfffd2c4509f43a3b2"><code>252fb19</code></a> build(deps): bump peter-evans/slash-command-dispatch from 2 to 3 (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1122">#1122</a>)</li> <li><a href="https://github.com/peter-evans/create-pull-request/commit/4b867c49391bf17f2d6c1cb033cbe9951c57c8c4"><code>4b867c4</code></a> build(deps): bump actions/setup-node from 2 to 3 (<a href="https://github-redirect.dependabot.com/peter-evans/create-pull-request/issues/1123">#1123</a>)</li> <li>Additional commits viewable in <a href="https://github.com/peter-evans/create-pull-request/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
2022-07-04 13:04:13 +00:00
uses: peter-evans/create-pull-request@v4
Fix release workflow (#4903) # Objective While playing with the code, I found some problems in the recently merged version-bumping workflow: - Most importantly, now that we are using `0.8.0-dev` in development, the workflow will try to bump it to `0.9.0` :sob: - The crate filter is outdated now that we have more crates in `tools`. - We are using `bevy@users.noreply.github.com`, but according to [Github help](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#about-commit-email-addresses), that email address means "old no-reply email format for the user `bevy`". It is currently not associated with any account, but I feel this is still not appropriate here. ## Solution - Create a new workflow, `Post-release version bump`, that should be run after a release and bumps version from `0.X.0` to `0.X+1.0-dev`. Unfortunately, cargo-release doesn't have a builtin way to do this, so we need to parse and increment the version manually. - Add the new crates in `tools` to exclusion list. Also removes the dependency version specifier from `bevy_ecs_compile_fail_tests`. It is not in the workspace so the dependency version will not get automatically updated by cargo-release. - Change the author email to `41898282+github-actions[bot]@users.noreply.github.com`. According to the discussion [here](https://github.com/actions/checkout/issues/13#issuecomment-724415212) and [here](https://github.community/t/github-actions-bot-email-address/17204/6), this is the email address associated with the github-actions bot account. - Also add the workflows to our release checklist. See infmagic2047#5 and infmagic2047#6 for examples of release and post-release PRs.
2022-06-06 15:47:51 +00:00
with:
delete-branch: true
base: "main"
title: "Bump Version after Release"
body: |
Bump version after release
This PR has been auto-generated