Skip to content

Commit f483fe1

Browse files
authored
Add Zed extension workflows (#214)
Hey everyone! We recently started working on dedicated workflows for extensions and this is the result of this! I'd like to add them here sooner than later (we eventually would like to set up org-wide rulesets for these), but I see this conflicts currently with your workflows already and I definitely do not want to remove your setup completely. Do we want to keep the jobs for the styling and merge it then? Happy to hear your opinion on this, feel free to reach out with any other feedback also!
1 parent 30e2ec1 commit f483fe1

File tree

4 files changed

+81
-88
lines changed

4 files changed

+81
-88
lines changed

.github/workflows/bump_version.yml

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

.github/workflows/ci.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated from xtask::workflows::extensions::release_version within the Zed repository.
2+
# Rebuild with `cargo xtask workflows`.
3+
name: extensions::release_version
4+
on:
5+
push:
6+
tags:
7+
- v**
8+
jobs:
9+
call_release_version:
10+
uses: zed-industries/zed/.github/workflows/extension_release.yml@main
11+
secrets:
12+
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
13+
app-secret: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}

.github/workflows/run_tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated from xtask::workflows::extensions::run_tests within the Zed repository.
2+
# Rebuild with `cargo xtask workflows`.
3+
name: extensions::run_tests
4+
on:
5+
pull_request:
6+
branches:
7+
- '**'
8+
push:
9+
branches:
10+
- main
11+
jobs:
12+
call_extension_tests:
13+
uses: zed-industries/zed/.github/workflows/extension_tests.yml@main
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}pr
16+
cancel-in-progress: true

0 commit comments

Comments
 (0)