Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Fix release workflow #4903

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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 spancmp \
--exclude build-wasm-example

- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
delete-branch: true
base: "main"
title: "Bump Version after Release"
body: |
Bump version after release
This PR has been auto-generated
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ jobs:

- name: Setup release
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 'bevy@users.noreply.github.com'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
# release: remove the dev suffix, like going from 0.X.0-dev to 0.X.0
# --workspace: updating all crates in the workspace
# --no-publish: do not publish to crates.io
# --execute: not a dry run
# --no-tag: do not push tag for each new version
# --no-push: do not push the update commits
# --dependent-version upgrade: change 0.X.0-dev in internal dependencies to 0.X.0
# --exclude: ignore those packages
cargo release minor \
cargo release release \
--workspace \
--no-publish \
--execute \
--no-tag \
--no-confirm \
--no-push \
--dependent-version upgrade \
--exclude ci \
--exclude errors \
--exclude bevy-ios-example
--exclude bevy-ios-example \
--exclude spancmp \
--exclude build-wasm-example

- name: Create PR
uses: peter-evans/create-pull-request@v3
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs_compile_fail_tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_ecs_compile_fail_tests"
version = "0.8.0-dev"
version = "0.1.0"
infmagic2047 marked this conversation as resolved.
Show resolved Hide resolved
edition = "2021"
description = "Compile fail tests for Bevy Engine's entity component system"
homepage = "https://bevyengine.org"
Expand All @@ -9,5 +9,5 @@ license = "MIT OR Apache-2.0"
publish = false

[dev-dependencies]
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
bevy_ecs = { path = "../bevy_ecs" }
trybuild = "1.0"
4 changes: 2 additions & 2 deletions docs/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
5. Create migration guide.
6. Write blog post.
7. Update book.
8. Bump version number for all crates.
8. Bump version number for all crates, using the "Release" workflow.
9. Create tag on GitHub.
10. Bump `latest` tag to most recent release.

Expand All @@ -26,5 +26,5 @@

## Post-release

1. Bump version number for all crates to next versions, as `0.X-dev`, to ensure properly displayed version for [Dev Docs](https://dev-docs.bevyengine.org/bevy/index.html).
1. Bump version number for all crates to next versions, as `0.X-dev`, using the "Post-release version bump" workflow, to ensure properly displayed version for [Dev Docs](https://dev-docs.bevyengine.org/bevy/index.html).
2. Update Bevy version used for Bevy book code validation to latest release.