mirror of
https://github.com/bevyengine/bevy
synced 2024-11-29 16:10:19 +00:00
dd7f800b25
# Objective Eliminate unnecessary Actions CI builds on forks, such as: - Daily builds, which are a waste of compute on forks, even if they succeed (although the Android build fails) - Administrative builds that attempt to deploy something In both the cases above, forks get CI failures that need to be ignored. It looks like this: <img width="1178" alt="image" src="https://github.com/bevyengine/bevy/assets/5838512/6365059a-1170-4bba-9c60-3e252ae7779f"> <img width="1186" alt="image" src="https://github.com/bevyengine/bevy/assets/5838512/ab824a0b-5202-42f7-a24f-95c5cd53376c"> ## Solution - [Only run some jobs when they are in the `bevyengine/bevy` repo.](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-run-job-for-specific-repository) - Leave the rest of the workflows alone (you still get a full set of CI for pull requests, for example) ---
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
name: Release
|
|
|
|
# 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:
|
|
if: github.repository == 'bevyengine/bevy'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install cargo-release
|
|
run: cargo install cargo-release
|
|
|
|
- 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 '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 release \
|
|
--workspace \
|
|
--no-publish \
|
|
--execute \
|
|
--no-tag \
|
|
--no-confirm \
|
|
--no-push \
|
|
--dependent-version upgrade \
|
|
--exclude ci \
|
|
--exclude errors \
|
|
--exclude bevy_mobile_example \
|
|
--exclude build-wasm-example
|
|
|
|
- name: Create PR
|
|
uses: peter-evans/create-pull-request@v5
|
|
with:
|
|
delete-branch: true
|
|
base: "main"
|
|
title: "Preparing Next Release"
|
|
body: |
|
|
Preparing next release
|
|
This PR has been auto-generated
|