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