Skip to content

Commit 4bc7fc9

Browse files
authored
Initialize CI/CD (#28)
1 parent 75afc0f commit 4bc7fc9

3 files changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/bump_version.yml

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

0 commit comments

Comments
 (0)