./script/trigger-release (#10589)

Add `./script/trigger-release {nightly|stable|preview}`

This command can be run regardless of the state of your local git
repository, and it
either triggers a workflow run of `bump_patch_version.yml` (for
stable/preview) or
it force pushes the nightly tag.

Also add some docs on releases to explain all of this.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-04-16 19:32:51 -06:00 committed by GitHub
parent bc7eaa6cd5
commit c4e446f8a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 87 additions and 15 deletions

View file

@ -1,4 +1,4 @@
name: Bump Patch Version
name: bump_patch_version
on:
workflow_dispatch:
@ -22,10 +22,12 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
ssh-key: ${{ secrets.ZED_BOT_DEPLOY_KEY }}
- name: Bump Patch Version
run: |
set -eu
set -eux
channel=$(cat crates/zed/RELEASE_CHANNEL)
tag_suffix=""
@ -40,9 +42,8 @@ jobs:
exit 1
;;
esac
which cargo-set-version > /dev/null || cargo install cargo-edit
which cargo-set-version > /dev/null || cargo install cargo-edit --features vendored-openssl
output=$(cargo set-version -p zed --bump patch 2>&1 | sed 's/.* //')
cargo check --quiet
git commit -am "Bump to $output for $GITHUB_ACTOR"
git tag v${output}${suffix}
git push origin HEAD v${output}${suffix}
git commit -am "Bump to $output for @$GITHUB_ACTOR" --author "Zed Bot <hi@zed.dev>"
git tag v${output}${tag_suffix}
git push origin HEAD v${output}${tag_suffix}