bump_patch_version.yml

 1# Generated from xtask::workflows::bump_patch_version
 2# Rebuild with `cargo xtask workflows`.
 3name: bump_patch_version
 4on:
 5  workflow_dispatch:
 6    inputs:
 7      branch:
 8        description: Branch name to run on
 9        required: true
10        type: string
11jobs:
12  run_bump_patch_version:
13    if: github.repository_owner == 'zed-industries'
14    runs-on: namespace-profile-16x32-ubuntu-2204
15    steps:
16    - id: get-app-token
17      name: steps::authenticate_as_zippy
18      uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
19      with:
20        app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
21        private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
22    - name: steps::checkout_repo_with_token
23      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
24      with:
25        clean: false
26        token: ${{ steps.get-app-token.outputs.token }}
27        ref: ${{ inputs.branch }}
28    - name: bump_patch_version::run_bump_patch_version::bump_patch_version
29      run: |
30        channel="$(cat crates/zed/RELEASE_CHANNEL)"
31
32        tag_suffix=""
33        case $channel in
34          stable)
35            ;;
36          preview)
37            tag_suffix="-pre"
38            ;;
39          *)
40            echo "this must be run on either of stable|preview release branches" >&2
41            exit 1
42            ;;
43        esac
44        which cargo-set-version > /dev/null || cargo install cargo-edit -f --no-default-features --features "set-version"
45        output="$(cargo set-version -p zed --bump patch 2>&1 | sed 's/.* //')"
46        git commit -am "Bump to $output for @$GITHUB_ACTOR"
47        git tag "v${output}${tag_suffix}"
48        git push origin HEAD "v${output}${tag_suffix}"
49      shell: bash -euxo pipefail {0}
50      env:
51        GIT_COMMITTER_NAME: Zed Zippy
52        GIT_COMMITTER_EMAIL: 234243425+zed-zippy[bot]@users.noreply.github.com
53        GIT_AUTHOR_NAME: Zed Zippy
54        GIT_AUTHOR_EMAIL: 234243425+zed-zippy[bot]@users.noreply.github.com
55        GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
56concurrency:
57  group: ${{ github.workflow }}-${{ inputs.branch }}
58  cancel-in-progress: true