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