1# Generated from xtask::workflows::extensions::bump_version within the Zed repository.
2# Rebuild with `cargo xtask workflows`.
3name: extensions::bump_version
4on:
5 pull_request:
6 types:
7 - labeled
8 push:
9 branches:
10 - main
11 paths-ignore:
12 - .github/**
13 workflow_dispatch: {}
14jobs:
15 determine_bump_type:
16 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
17 runs-on: namespace-profile-2x4-ubuntu-2404
18 permissions: {}
19 steps:
20 - id: get-bump-type
21 name: extensions::bump_version::get_bump_type
22 run: |
23 if [ "$HAS_MAJOR_LABEL" = "true" ]; then
24 bump_type="major"
25 elif [ "$HAS_MINOR_LABEL" = "true" ]; then
26 bump_type="minor"
27 else
28 bump_type="patch"
29 fi
30 echo "bump_type=$bump_type" >> $GITHUB_OUTPUT
31 shell: bash -euxo pipefail {0}
32 env:
33 HAS_MAJOR_LABEL: |-
34 ${{ (github.event.action == 'labeled' && github.event.label.name == 'major') ||
35 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'major')) }}
36 HAS_MINOR_LABEL: |-
37 ${{ (github.event.action == 'labeled' && github.event.label.name == 'minor') ||
38 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'minor')) }}
39 outputs:
40 bump_type: ${{ steps.get-bump-type.outputs.bump_type }}
41 call_bump_version:
42 needs:
43 - determine_bump_type
44 if: github.event.action != 'labeled' || needs.determine_bump_type.outputs.bump_type != 'patch'
45 permissions:
46 contents: write
47 issues: write
48 pull-requests: write
49 uses: zed-industries/zed/.github/workflows/extension_bump.yml@main
50 secrets:
51 app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
52 app-secret: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
53 with:
54 bump-type: ${{ needs.determine_bump_type.outputs.bump_type }}
55 force-bump: true
56concurrency:
57 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}labels
58 cancel-in-progress: true