1name: bump_patch_version
2
3on:
4 workflow_dispatch:
5 inputs:
6 branch:
7 description: "Branch name to run on"
8 required: true
9
10concurrency:
11 # Allow only one workflow per any non-`main` branch.
12 group: ${{ github.workflow }}-${{ inputs.branch }}
13 cancel-in-progress: true
14
15jobs:
16 bump_patch_version:
17 runs-on:
18 - self-hosted
19 - test
20 steps:
21 - name: Checkout code
22 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
23 with:
24 ref: ${{ github.event.inputs.branch }}
25 ssh-key: ${{ secrets.ZED_BOT_DEPLOY_KEY }}
26
27 - name: Bump Patch Version
28 run: |
29 set -eux
30
31 channel=$(cat crates/zed/RELEASE_CHANNEL)
32
33 tag_suffix=""
34 case $channel in
35 stable)
36 ;;
37 preview)
38 tag_suffix="-pre"
39 ;;
40 *)
41 echo "this must be run on either of stable|preview release branches" >&2
42 exit 1
43 ;;
44 esac
45 which cargo-set-version > /dev/null || cargo install cargo-edit --features vendored-openssl
46 output=$(cargo set-version -p zed --bump patch 2>&1 | sed 's/.* //')
47 git commit -am "Bump to $output for @$GITHUB_ACTOR" --author "Zed Bot <hi@zed.dev>"
48 git tag v${output}${tag_suffix}
49 git push origin HEAD v${output}${tag_suffix}