1# Generated from xtask::workflows::release
2# Rebuild with `cargo xtask workflows`.
3name: release
4env:
5 CARGO_TERM_COLOR: always
6 RUST_BACKTRACE: '1'
7on:
8 push:
9 tags:
10 - v*
11jobs:
12 run_tests_mac:
13 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
14 runs-on: self-mini-macos
15 steps:
16 - name: steps::checkout_repo
17 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
18 with:
19 clean: false
20 - name: steps::setup_cargo_config
21 run: |
22 mkdir -p ./../.cargo
23 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
24 shell: bash -euxo pipefail {0}
25 - name: steps::setup_node
26 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
27 with:
28 node-version: '20'
29 - name: steps::clear_target_dir_if_large
30 run: ./script/clear-target-dir-if-larger-than 300
31 shell: bash -euxo pipefail {0}
32 - name: steps::cargo_nextest
33 run: cargo nextest run --workspace --no-fail-fast
34 shell: bash -euxo pipefail {0}
35 - name: steps::cleanup_cargo_config
36 if: always()
37 run: |
38 rm -rf ./../.cargo
39 shell: bash -euxo pipefail {0}
40 timeout-minutes: 60
41 run_tests_linux:
42 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
43 runs-on: namespace-profile-16x32-ubuntu-2204
44 steps:
45 - name: steps::checkout_repo
46 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
47 with:
48 clean: false
49 - name: steps::setup_cargo_config
50 run: |
51 mkdir -p ./../.cargo
52 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
53 shell: bash -euxo pipefail {0}
54 - name: steps::cache_rust_dependencies_namespace
55 uses: namespacelabs/nscloud-cache-action@v1
56 with:
57 cache: rust
58 - name: steps::setup_linux
59 run: ./script/linux
60 shell: bash -euxo pipefail {0}
61 - name: steps::install_mold
62 run: ./script/install-mold
63 shell: bash -euxo pipefail {0}
64 - name: steps::download_wasi_sdk
65 run: ./script/download-wasi-sdk
66 shell: bash -euxo pipefail {0}
67 - name: steps::setup_node
68 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
69 with:
70 node-version: '20'
71 - name: steps::cargo_install_nextest
72 uses: taiki-e/install-action@nextest
73 - name: steps::clear_target_dir_if_large
74 run: ./script/clear-target-dir-if-larger-than 250
75 shell: bash -euxo pipefail {0}
76 - name: steps::cargo_nextest
77 run: cargo nextest run --workspace --no-fail-fast
78 shell: bash -euxo pipefail {0}
79 - name: steps::cleanup_cargo_config
80 if: always()
81 run: |
82 rm -rf ./../.cargo
83 shell: bash -euxo pipefail {0}
84 timeout-minutes: 60
85 run_tests_windows:
86 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
87 runs-on: self-32vcpu-windows-2022
88 steps:
89 - name: steps::checkout_repo
90 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
91 with:
92 clean: false
93 - name: steps::setup_cargo_config
94 run: |
95 New-Item -ItemType Directory -Path "./../.cargo" -Force
96 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
97 shell: pwsh
98 - name: steps::setup_node
99 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
100 with:
101 node-version: '20'
102 - name: steps::clear_target_dir_if_large
103 run: ./script/clear-target-dir-if-larger-than.ps1 250
104 shell: pwsh
105 - name: steps::cargo_nextest
106 run: cargo nextest run --workspace --no-fail-fast
107 shell: pwsh
108 - name: steps::cleanup_cargo_config
109 if: always()
110 run: |
111 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
112 shell: pwsh
113 timeout-minutes: 60
114 clippy_mac:
115 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
116 runs-on: self-mini-macos
117 steps:
118 - name: steps::checkout_repo
119 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
120 with:
121 clean: false
122 - name: steps::setup_cargo_config
123 run: |
124 mkdir -p ./../.cargo
125 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
126 shell: bash -euxo pipefail {0}
127 - name: steps::clippy
128 run: ./script/clippy
129 shell: bash -euxo pipefail {0}
130 timeout-minutes: 60
131 clippy_linux:
132 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
133 runs-on: namespace-profile-16x32-ubuntu-2204
134 steps:
135 - name: steps::checkout_repo
136 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
137 with:
138 clean: false
139 - name: steps::setup_cargo_config
140 run: |
141 mkdir -p ./../.cargo
142 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
143 shell: bash -euxo pipefail {0}
144 - name: steps::cache_rust_dependencies_namespace
145 uses: namespacelabs/nscloud-cache-action@v1
146 with:
147 cache: rust
148 - name: steps::setup_linux
149 run: ./script/linux
150 shell: bash -euxo pipefail {0}
151 - name: steps::install_mold
152 run: ./script/install-mold
153 shell: bash -euxo pipefail {0}
154 - name: steps::download_wasi_sdk
155 run: ./script/download-wasi-sdk
156 shell: bash -euxo pipefail {0}
157 - name: steps::clippy
158 run: ./script/clippy
159 shell: bash -euxo pipefail {0}
160 timeout-minutes: 60
161 clippy_windows:
162 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
163 runs-on: self-32vcpu-windows-2022
164 steps:
165 - name: steps::checkout_repo
166 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
167 with:
168 clean: false
169 - name: steps::setup_cargo_config
170 run: |
171 New-Item -ItemType Directory -Path "./../.cargo" -Force
172 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
173 shell: pwsh
174 - name: steps::clippy
175 run: ./script/clippy.ps1
176 shell: pwsh
177 timeout-minutes: 60
178 check_scripts:
179 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
180 runs-on: namespace-profile-2x4-ubuntu-2404
181 steps:
182 - name: steps::checkout_repo
183 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
184 with:
185 clean: false
186 - name: run_tests::check_scripts::run_shellcheck
187 run: ./script/shellcheck-scripts error
188 shell: bash -euxo pipefail {0}
189 - id: get_actionlint
190 name: run_tests::check_scripts::download_actionlint
191 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
192 shell: bash -euxo pipefail {0}
193 - name: run_tests::check_scripts::run_actionlint
194 run: |
195 ${{ steps.get_actionlint.outputs.executable }} -color
196 shell: bash -euxo pipefail {0}
197 - name: run_tests::check_scripts::check_xtask_workflows
198 run: |
199 cargo xtask workflows
200 if ! git diff --exit-code .github; then
201 echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
202 echo "Please run 'cargo xtask workflows' locally and commit the changes"
203 exit 1
204 fi
205 shell: bash -euxo pipefail {0}
206 timeout-minutes: 60
207 create_draft_release:
208 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
209 runs-on: namespace-profile-2x4-ubuntu-2404
210 steps:
211 - name: steps::checkout_repo
212 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
213 with:
214 clean: false
215 fetch-depth: 25
216 ref: ${{ github.ref }}
217 - name: script/determine-release-channel
218 run: script/determine-release-channel
219 shell: bash -euxo pipefail {0}
220 - name: mkdir -p target/
221 run: mkdir -p target/
222 shell: bash -euxo pipefail {0}
223 - name: release::create_draft_release::generate_release_notes
224 run: node --redirect-warnings=/dev/null ./script/draft-release-notes "$RELEASE_VERSION" "$RELEASE_CHANNEL" > target/release-notes.md
225 shell: bash -euxo pipefail {0}
226 - name: release::create_draft_release::create_release
227 run: script/create-draft-release target/release-notes.md
228 shell: bash -euxo pipefail {0}
229 env:
230 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
231 timeout-minutes: 60
232 bundle_linux_aarch64:
233 needs:
234 - run_tests_linux
235 - clippy_linux
236 - check_scripts
237 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
238 env:
239 CARGO_INCREMENTAL: 0
240 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
241 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
242 steps:
243 - name: steps::checkout_repo
244 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
245 with:
246 clean: false
247 - name: steps::setup_sentry
248 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
249 with:
250 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
251 - name: steps::setup_linux
252 run: ./script/linux
253 shell: bash -euxo pipefail {0}
254 - name: steps::install_mold
255 run: ./script/install-mold
256 shell: bash -euxo pipefail {0}
257 - name: steps::download_wasi_sdk
258 run: ./script/download-wasi-sdk
259 shell: bash -euxo pipefail {0}
260 - name: ./script/bundle-linux
261 run: ./script/bundle-linux
262 shell: bash -euxo pipefail {0}
263 - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
264 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
265 with:
266 name: zed-linux-aarch64.tar.gz
267 path: target/release/zed-linux-aarch64.tar.gz
268 if-no-files-found: error
269 - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
270 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
271 with:
272 name: zed-remote-server-linux-aarch64.gz
273 path: target/zed-remote-server-linux-aarch64.gz
274 if-no-files-found: error
275 timeout-minutes: 60
276 bundle_linux_x86_64:
277 needs:
278 - run_tests_linux
279 - clippy_linux
280 - check_scripts
281 runs-on: namespace-profile-32x64-ubuntu-2004
282 env:
283 CARGO_INCREMENTAL: 0
284 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
285 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
286 steps:
287 - name: steps::checkout_repo
288 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
289 with:
290 clean: false
291 - name: steps::setup_sentry
292 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
293 with:
294 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
295 - name: steps::setup_linux
296 run: ./script/linux
297 shell: bash -euxo pipefail {0}
298 - name: steps::install_mold
299 run: ./script/install-mold
300 shell: bash -euxo pipefail {0}
301 - name: steps::download_wasi_sdk
302 run: ./script/download-wasi-sdk
303 shell: bash -euxo pipefail {0}
304 - name: ./script/bundle-linux
305 run: ./script/bundle-linux
306 shell: bash -euxo pipefail {0}
307 - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
308 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
309 with:
310 name: zed-linux-x86_64.tar.gz
311 path: target/release/zed-linux-x86_64.tar.gz
312 if-no-files-found: error
313 - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
314 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
315 with:
316 name: zed-remote-server-linux-x86_64.gz
317 path: target/zed-remote-server-linux-x86_64.gz
318 if-no-files-found: error
319 timeout-minutes: 60
320 bundle_mac_aarch64:
321 needs:
322 - run_tests_mac
323 - clippy_mac
324 - check_scripts
325 runs-on: self-mini-macos
326 env:
327 CARGO_INCREMENTAL: 0
328 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
329 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
330 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
331 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
332 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
333 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
334 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
335 steps:
336 - name: steps::checkout_repo
337 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
338 with:
339 clean: false
340 - name: steps::setup_node
341 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
342 with:
343 node-version: '20'
344 - name: steps::setup_sentry
345 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
346 with:
347 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
348 - name: steps::clear_target_dir_if_large
349 run: ./script/clear-target-dir-if-larger-than 300
350 shell: bash -euxo pipefail {0}
351 - name: run_bundling::bundle_mac::bundle_mac
352 run: ./script/bundle-mac aarch64-apple-darwin
353 shell: bash -euxo pipefail {0}
354 - name: '@actions/upload-artifact Zed-aarch64.dmg'
355 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
356 with:
357 name: Zed-aarch64.dmg
358 path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
359 if-no-files-found: error
360 - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
361 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
362 with:
363 name: zed-remote-server-macos-aarch64.gz
364 path: target/zed-remote-server-macos-aarch64.gz
365 if-no-files-found: error
366 timeout-minutes: 60
367 bundle_mac_x86_64:
368 needs:
369 - run_tests_mac
370 - clippy_mac
371 - check_scripts
372 runs-on: self-mini-macos
373 env:
374 CARGO_INCREMENTAL: 0
375 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
376 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
377 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
378 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
379 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
380 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
381 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
382 steps:
383 - name: steps::checkout_repo
384 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
385 with:
386 clean: false
387 - name: steps::setup_node
388 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
389 with:
390 node-version: '20'
391 - name: steps::setup_sentry
392 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
393 with:
394 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
395 - name: steps::clear_target_dir_if_large
396 run: ./script/clear-target-dir-if-larger-than 300
397 shell: bash -euxo pipefail {0}
398 - name: run_bundling::bundle_mac::bundle_mac
399 run: ./script/bundle-mac x86_64-apple-darwin
400 shell: bash -euxo pipefail {0}
401 - name: '@actions/upload-artifact Zed-x86_64.dmg'
402 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
403 with:
404 name: Zed-x86_64.dmg
405 path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
406 if-no-files-found: error
407 - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
408 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
409 with:
410 name: zed-remote-server-macos-x86_64.gz
411 path: target/zed-remote-server-macos-x86_64.gz
412 if-no-files-found: error
413 timeout-minutes: 60
414 bundle_windows_aarch64:
415 needs:
416 - run_tests_windows
417 - clippy_windows
418 - check_scripts
419 runs-on: self-32vcpu-windows-2022
420 env:
421 CARGO_INCREMENTAL: 0
422 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
423 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
424 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
425 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
426 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
427 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
428 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
429 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
430 FILE_DIGEST: SHA256
431 TIMESTAMP_DIGEST: SHA256
432 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
433 steps:
434 - name: steps::checkout_repo
435 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
436 with:
437 clean: false
438 - name: steps::setup_sentry
439 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
440 with:
441 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
442 - name: run_bundling::bundle_windows::bundle_windows
443 run: script/bundle-windows.ps1 -Architecture aarch64
444 shell: pwsh
445 working-directory: ${{ env.ZED_WORKSPACE }}
446 - name: '@actions/upload-artifact Zed-aarch64.exe'
447 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
448 with:
449 name: Zed-aarch64.exe
450 path: target/Zed-aarch64.exe
451 if-no-files-found: error
452 - name: '@actions/upload-artifact zed-remote-server-windows-aarch64.zip'
453 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
454 with:
455 name: zed-remote-server-windows-aarch64.zip
456 path: target/zed-remote-server-windows-aarch64.zip
457 if-no-files-found: error
458 timeout-minutes: 60
459 bundle_windows_x86_64:
460 needs:
461 - run_tests_windows
462 - clippy_windows
463 - check_scripts
464 runs-on: self-32vcpu-windows-2022
465 env:
466 CARGO_INCREMENTAL: 0
467 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
468 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
469 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
470 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
471 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
472 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
473 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
474 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
475 FILE_DIGEST: SHA256
476 TIMESTAMP_DIGEST: SHA256
477 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
478 steps:
479 - name: steps::checkout_repo
480 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
481 with:
482 clean: false
483 - name: steps::setup_sentry
484 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
485 with:
486 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
487 - name: run_bundling::bundle_windows::bundle_windows
488 run: script/bundle-windows.ps1 -Architecture x86_64
489 shell: pwsh
490 working-directory: ${{ env.ZED_WORKSPACE }}
491 - name: '@actions/upload-artifact Zed-x86_64.exe'
492 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
493 with:
494 name: Zed-x86_64.exe
495 path: target/Zed-x86_64.exe
496 if-no-files-found: error
497 - name: '@actions/upload-artifact zed-remote-server-windows-x86_64.zip'
498 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
499 with:
500 name: zed-remote-server-windows-x86_64.zip
501 path: target/zed-remote-server-windows-x86_64.zip
502 if-no-files-found: error
503 timeout-minutes: 60
504 upload_release_assets:
505 needs:
506 - create_draft_release
507 - bundle_linux_aarch64
508 - bundle_linux_x86_64
509 - bundle_mac_aarch64
510 - bundle_mac_x86_64
511 - bundle_windows_aarch64
512 - bundle_windows_x86_64
513 runs-on: namespace-profile-4x8-ubuntu-2204
514 steps:
515 - name: release::download_workflow_artifacts
516 uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
517 with:
518 path: ./artifacts/
519 - name: ls -lR ./artifacts
520 run: ls -lR ./artifacts
521 shell: bash -euxo pipefail {0}
522 - name: release::prep_release_artifacts
523 run: |-
524 mkdir -p release-artifacts/
525
526 mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
527 mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
528 mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
529 mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
530 mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
531 mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
532 mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
533 mv ./artifacts/zed-remote-server-macos-x86_64.gz/zed-remote-server-macos-x86_64.gz release-artifacts/zed-remote-server-macos-x86_64.gz
534 mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
535 mv ./artifacts/zed-remote-server-linux-x86_64.gz/zed-remote-server-linux-x86_64.gz release-artifacts/zed-remote-server-linux-x86_64.gz
536 mv ./artifacts/zed-remote-server-windows-aarch64.zip/zed-remote-server-windows-aarch64.zip release-artifacts/zed-remote-server-windows-aarch64.zip
537 mv ./artifacts/zed-remote-server-windows-x86_64.zip/zed-remote-server-windows-x86_64.zip release-artifacts/zed-remote-server-windows-x86_64.zip
538 shell: bash -euxo pipefail {0}
539 - name: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
540 run: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
541 shell: bash -euxo pipefail {0}
542 env:
543 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
544 validate_release_assets:
545 needs:
546 - upload_release_assets
547 runs-on: namespace-profile-2x4-ubuntu-2404
548 steps:
549 - name: release::validate_release_assets
550 run: |
551 EXPECTED_ASSETS='["Zed-aarch64.dmg", "Zed-x86_64.dmg", "zed-linux-aarch64.tar.gz", "zed-linux-x86_64.tar.gz", "Zed-x86_64.exe", "Zed-aarch64.exe", "zed-remote-server-macos-aarch64.gz", "zed-remote-server-macos-x86_64.gz", "zed-remote-server-linux-aarch64.gz", "zed-remote-server-linux-x86_64.gz", "zed-remote-server-windows-aarch64.zip", "zed-remote-server-windows-x86_64.zip"]'
552 TAG="$GITHUB_REF_NAME"
553
554 ACTUAL_ASSETS=$(gh release view "$TAG" --repo=zed-industries/zed --json assets -q '[.assets[].name]')
555
556 MISSING_ASSETS=$(echo "$EXPECTED_ASSETS" | jq -r --argjson actual "$ACTUAL_ASSETS" '. - $actual | .[]')
557
558 if [ -n "$MISSING_ASSETS" ]; then
559 echo "Error: The following assets are missing from the release:"
560 echo "$MISSING_ASSETS"
561 exit 1
562 fi
563
564 echo "All expected assets are present in the release."
565 shell: bash -euxo pipefail {0}
566 env:
567 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
568 auto_release_preview:
569 needs:
570 - validate_release_assets
571 if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
572 runs-on: namespace-profile-2x4-ubuntu-2404
573 steps:
574 - id: get-app-token
575 name: steps::authenticate_as_zippy
576 uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
577 with:
578 app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
579 private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
580 - name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
581 run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
582 shell: bash -euxo pipefail {0}
583 env:
584 GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
585 push_release_update_notification:
586 needs:
587 - create_draft_release
588 - upload_release_assets
589 - validate_release_assets
590 - auto_release_preview
591 if: always()
592 runs-on: namespace-profile-2x4-ubuntu-2404
593 steps:
594 - id: generate-webhook-message
595 name: release::generate_slack_message
596 run: |
597 MESSAGE=$(DRAFT_RESULT="${{ needs.create_draft_release.result }}"
598 UPLOAD_RESULT="${{ needs.upload_release_assets.result }}"
599 VALIDATE_RESULT="${{ needs.validate_release_assets.result }}"
600 AUTO_RELEASE_RESULT="${{ needs.auto_release_preview.result }}"
601 TAG="$GITHUB_REF_NAME"
602 RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
603
604 if [ "$DRAFT_RESULT" == "failure" ]; then
605 echo "❌ Draft release creation failed for $TAG: $RUN_URL"
606 else
607 RELEASE_URL=$(gh release view "$TAG" --repo=zed-industries/zed --json url -q '.url')
608 if [ "$UPLOAD_RESULT" == "failure" ]; then
609 echo "❌ Release asset upload failed for $TAG: $RELEASE_URL"
610 elif [ "$VALIDATE_RESULT" == "failure" ]; then
611 echo "❌ Release asset validation failed for $TAG (missing assets): $RUN_URL"
612 elif [ "$AUTO_RELEASE_RESULT" == "success" ]; then
613 echo "✅ Release $TAG was auto-released successfully: $RELEASE_URL"
614 elif [ "$AUTO_RELEASE_RESULT" == "failure" ]; then
615 echo "❌ Auto release failed for $TAG: $RUN_URL"
616 else
617 echo "👀 Release $TAG sitting freshly baked in the oven and waiting to be published: $RELEASE_URL"
618 fi
619 fi
620 )
621 echo "message=$MESSAGE" >> "$GITHUB_OUTPUT"
622 shell: bash -euxo pipefail {0}
623 - name: release::send_slack_message
624 run: |
625 curl -X POST -H 'Content-type: application/json'\
626 --data '{"text":"${{ steps.generate-webhook-message.outputs.message }}"}' "$SLACK_WEBHOOK"
627 shell: bash -euxo pipefail {0}
628 env:
629 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
630concurrency:
631 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
632 cancel-in-progress: true