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::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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
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@921e2c9f7148d7ba14cd819f417db338f63e733c
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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 compliance_check:
295 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
296 runs-on: namespace-profile-2x4-ubuntu-2404
297 steps:
298 - name: steps::checkout_repo
299 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
300 with:
301 clean: false
302 fetch-depth: 0
303 ref: ${{ github.ref }}
304 - name: steps::cache_rust_dependencies_namespace
305 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
306 with:
307 cache: rust
308 path: ~/.rustup
309 - id: run-compliance-check
310 name: release::compliance_check::run_compliance_check
311 run: |
312 cargo xtask compliance "$GITHUB_REF_NAME" --report-path compliance-report
313 env:
314 GITHUB_APP_ID: ${{ secrets.ZED_ZIPPY_APP_ID }}
315 GITHUB_APP_KEY: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
316 continue-on-error: true
317 - name: '@actions/upload-artifact compliance-report.md'
318 if: always()
319 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
320 with:
321 name: compliance-report.md
322 path: target/compliance-report.md
323 if-no-files-found: error
324 - name: send_compliance_slack_notification
325 if: always()
326 run: |
327 if [ "$COMPLIANCE_OUTCOME" == "success" ]; then
328 STATUS="✅ Compliance check passed for $COMPLIANCE_TAG"
329 else
330 STATUS="❌ Compliance check failed for $COMPLIANCE_TAG"
331 fi
332
333 MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22")
334
335 curl -X POST -H 'Content-type: application/json' \
336 --data "$(jq -n --arg text "$MESSAGE" '{"text": $text}')" \
337 "$SLACK_WEBHOOK"
338 env:
339 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
340 COMPLIANCE_OUTCOME: ${{ steps.run-compliance-check.outcome }}
341 COMPLIANCE_TAG: ${{ github.ref_name }}
342 ARTIFACT_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts
343 timeout-minutes: 60
344 bundle_linux_aarch64:
345 needs:
346 - run_tests_linux
347 - clippy_linux
348 - check_scripts
349 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
350 env:
351 CARGO_INCREMENTAL: 0
352 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
353 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
354 CC: clang-18
355 CXX: clang++-18
356 steps:
357 - name: steps::checkout_repo
358 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
359 with:
360 clean: false
361 - name: steps::setup_sentry
362 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
363 with:
364 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
365 - name: steps::setup_linux
366 run: ./script/linux
367 - name: steps::download_wasi_sdk
368 run: ./script/download-wasi-sdk
369 - name: ./script/bundle-linux
370 run: ./script/bundle-linux
371 - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
372 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
373 with:
374 name: zed-linux-aarch64.tar.gz
375 path: target/release/zed-linux-aarch64.tar.gz
376 if-no-files-found: error
377 - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
378 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
379 with:
380 name: zed-remote-server-linux-aarch64.gz
381 path: target/zed-remote-server-linux-aarch64.gz
382 if-no-files-found: error
383 timeout-minutes: 60
384 bundle_linux_x86_64:
385 needs:
386 - run_tests_linux
387 - clippy_linux
388 - check_scripts
389 runs-on: namespace-profile-32x64-ubuntu-2004
390 env:
391 CARGO_INCREMENTAL: 0
392 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
393 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
394 CC: clang-18
395 CXX: clang++-18
396 steps:
397 - name: steps::checkout_repo
398 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
399 with:
400 clean: false
401 - name: steps::setup_sentry
402 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
403 with:
404 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
405 - name: steps::setup_linux
406 run: ./script/linux
407 - name: steps::download_wasi_sdk
408 run: ./script/download-wasi-sdk
409 - name: ./script/bundle-linux
410 run: ./script/bundle-linux
411 - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
412 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
413 with:
414 name: zed-linux-x86_64.tar.gz
415 path: target/release/zed-linux-x86_64.tar.gz
416 if-no-files-found: error
417 - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
418 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
419 with:
420 name: zed-remote-server-linux-x86_64.gz
421 path: target/zed-remote-server-linux-x86_64.gz
422 if-no-files-found: error
423 timeout-minutes: 60
424 bundle_mac_aarch64:
425 needs:
426 - run_tests_mac
427 - clippy_mac
428 - check_scripts
429 runs-on: namespace-profile-mac-large
430 env:
431 CARGO_INCREMENTAL: 0
432 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
433 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
434 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
435 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
436 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
437 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
438 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
439 steps:
440 - name: steps::checkout_repo
441 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
442 with:
443 clean: false
444 - name: steps::setup_node
445 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
446 with:
447 node-version: '20'
448 - name: steps::setup_sentry
449 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
450 with:
451 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
452 - name: steps::clear_target_dir_if_large
453 run: ./script/clear-target-dir-if-larger-than 300
454 - name: run_bundling::bundle_mac::bundle_mac
455 run: ./script/bundle-mac aarch64-apple-darwin
456 - name: '@actions/upload-artifact Zed-aarch64.dmg'
457 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
458 with:
459 name: Zed-aarch64.dmg
460 path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
461 if-no-files-found: error
462 - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
463 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
464 with:
465 name: zed-remote-server-macos-aarch64.gz
466 path: target/zed-remote-server-macos-aarch64.gz
467 if-no-files-found: error
468 timeout-minutes: 60
469 bundle_mac_x86_64:
470 needs:
471 - run_tests_mac
472 - clippy_mac
473 - check_scripts
474 runs-on: namespace-profile-mac-large
475 env:
476 CARGO_INCREMENTAL: 0
477 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
478 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
479 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
480 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
481 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
482 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
483 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
484 steps:
485 - name: steps::checkout_repo
486 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
487 with:
488 clean: false
489 - name: steps::setup_node
490 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
491 with:
492 node-version: '20'
493 - name: steps::setup_sentry
494 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
495 with:
496 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
497 - name: steps::clear_target_dir_if_large
498 run: ./script/clear-target-dir-if-larger-than 300
499 - name: run_bundling::bundle_mac::bundle_mac
500 run: ./script/bundle-mac x86_64-apple-darwin
501 - name: '@actions/upload-artifact Zed-x86_64.dmg'
502 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
503 with:
504 name: Zed-x86_64.dmg
505 path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
506 if-no-files-found: error
507 - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
508 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
509 with:
510 name: zed-remote-server-macos-x86_64.gz
511 path: target/zed-remote-server-macos-x86_64.gz
512 if-no-files-found: error
513 timeout-minutes: 60
514 bundle_windows_aarch64:
515 needs:
516 - run_tests_windows
517 - clippy_windows
518 - check_scripts
519 runs-on: self-32vcpu-windows-2022
520 env:
521 CARGO_INCREMENTAL: 0
522 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
523 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
524 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
525 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
526 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
527 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
528 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
529 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
530 FILE_DIGEST: SHA256
531 TIMESTAMP_DIGEST: SHA256
532 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
533 steps:
534 - name: steps::checkout_repo
535 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
536 with:
537 clean: false
538 - name: steps::setup_sentry
539 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
540 with:
541 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
542 - name: run_bundling::bundle_windows::bundle_windows
543 run: script/bundle-windows.ps1 -Architecture aarch64
544 shell: pwsh
545 working-directory: ${{ env.ZED_WORKSPACE }}
546 - name: '@actions/upload-artifact Zed-aarch64.exe'
547 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
548 with:
549 name: Zed-aarch64.exe
550 path: target/Zed-aarch64.exe
551 if-no-files-found: error
552 - name: '@actions/upload-artifact zed-remote-server-windows-aarch64.zip'
553 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
554 with:
555 name: zed-remote-server-windows-aarch64.zip
556 path: target/zed-remote-server-windows-aarch64.zip
557 if-no-files-found: error
558 timeout-minutes: 60
559 bundle_windows_x86_64:
560 needs:
561 - run_tests_windows
562 - clippy_windows
563 - check_scripts
564 runs-on: self-32vcpu-windows-2022
565 env:
566 CARGO_INCREMENTAL: 0
567 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
568 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
569 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
570 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
571 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
572 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
573 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
574 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
575 FILE_DIGEST: SHA256
576 TIMESTAMP_DIGEST: SHA256
577 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
578 steps:
579 - name: steps::checkout_repo
580 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
581 with:
582 clean: false
583 - name: steps::setup_sentry
584 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
585 with:
586 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
587 - name: run_bundling::bundle_windows::bundle_windows
588 run: script/bundle-windows.ps1 -Architecture x86_64
589 shell: pwsh
590 working-directory: ${{ env.ZED_WORKSPACE }}
591 - name: '@actions/upload-artifact Zed-x86_64.exe'
592 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
593 with:
594 name: Zed-x86_64.exe
595 path: target/Zed-x86_64.exe
596 if-no-files-found: error
597 - name: '@actions/upload-artifact zed-remote-server-windows-x86_64.zip'
598 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
599 with:
600 name: zed-remote-server-windows-x86_64.zip
601 path: target/zed-remote-server-windows-x86_64.zip
602 if-no-files-found: error
603 timeout-minutes: 60
604 upload_release_assets:
605 needs:
606 - create_draft_release
607 - bundle_linux_aarch64
608 - bundle_linux_x86_64
609 - bundle_mac_aarch64
610 - bundle_mac_x86_64
611 - bundle_windows_aarch64
612 - bundle_windows_x86_64
613 runs-on: namespace-profile-4x8-ubuntu-2204
614 steps:
615 - name: release::download_workflow_artifacts
616 uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
617 with:
618 path: ./artifacts/
619 - name: ls -lR ./artifacts
620 run: ls -lR ./artifacts
621 - name: release::prep_release_artifacts
622 run: |-
623 mkdir -p release-artifacts/
624
625 mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
626 mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
627 mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
628 mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
629 mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
630 mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
631 mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
632 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
633 mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
634 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
635 mv ./artifacts/zed-remote-server-windows-aarch64.zip/zed-remote-server-windows-aarch64.zip release-artifacts/zed-remote-server-windows-aarch64.zip
636 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
637 - name: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
638 run: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
639 env:
640 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
641 validate_release_assets:
642 needs:
643 - upload_release_assets
644 runs-on: namespace-profile-2x4-ubuntu-2404
645 steps:
646 - name: release::validate_release_assets
647 run: |
648 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"]'
649 TAG="$GITHUB_REF_NAME"
650
651 ACTUAL_ASSETS=$(gh release view "$TAG" --repo=zed-industries/zed --json assets -q '[.assets[].name]')
652
653 MISSING_ASSETS=$(echo "$EXPECTED_ASSETS" | jq -r --argjson actual "$ACTUAL_ASSETS" '. - $actual | .[]')
654
655 if [ -n "$MISSING_ASSETS" ]; then
656 echo "Error: The following assets are missing from the release:"
657 echo "$MISSING_ASSETS"
658 exit 1
659 fi
660
661 echo "All expected assets are present in the release."
662 env:
663 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
664 - name: steps::checkout_repo
665 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
666 with:
667 clean: false
668 fetch-depth: 0
669 ref: ${{ github.ref }}
670 - name: steps::cache_rust_dependencies_namespace
671 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
672 with:
673 cache: rust
674 path: ~/.rustup
675 - id: run-post-upload-compliance-check
676 name: release::validate_release_assets::run_post_upload_compliance_check
677 run: |
678 cargo xtask compliance "$GITHUB_REF_NAME" --report-path compliance-report
679 env:
680 GITHUB_APP_ID: ${{ secrets.ZED_ZIPPY_APP_ID }}
681 GITHUB_APP_KEY: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
682 - name: '@actions/upload-artifact compliance-report.md'
683 if: always()
684 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
685 with:
686 name: compliance-report.md
687 path: target/compliance-report.md
688 if-no-files-found: error
689 overwrite: true
690 - name: send_compliance_slack_notification
691 if: always()
692 run: |
693 if [ "$COMPLIANCE_OUTCOME" == "success" ]; then
694 STATUS="✅ Compliance check passed for $COMPLIANCE_TAG"
695 else
696 STATUS="❌ Compliance check failed for $COMPLIANCE_TAG"
697 fi
698
699 MESSAGE=$(printf "%s\n\nReport: %s\nPRs needing review: %s" "$STATUS" "$ARTIFACT_URL" "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22")
700
701 curl -X POST -H 'Content-type: application/json' \
702 --data "$(jq -n --arg text "$MESSAGE" '{"text": $text}')" \
703 "$SLACK_WEBHOOK"
704 env:
705 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
706 COMPLIANCE_OUTCOME: ${{ steps.run-post-upload-compliance-check.outcome }}
707 COMPLIANCE_TAG: ${{ github.ref_name }}
708 ARTIFACT_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts
709 auto_release_preview:
710 needs:
711 - validate_release_assets
712 if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
713 runs-on: namespace-profile-2x4-ubuntu-2404
714 steps:
715 - id: generate-token
716 name: steps::authenticate_as_zippy
717 uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
718 with:
719 app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
720 private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
721 - name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
722 run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
723 env:
724 GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
725 push_release_update_notification:
726 needs:
727 - create_draft_release
728 - upload_release_assets
729 - validate_release_assets
730 - auto_release_preview
731 - run_tests_mac
732 - run_tests_linux
733 - run_tests_windows
734 - clippy_mac
735 - clippy_linux
736 - clippy_windows
737 - check_scripts
738 - bundle_linux_aarch64
739 - bundle_linux_x86_64
740 - bundle_mac_aarch64
741 - bundle_mac_x86_64
742 - bundle_windows_aarch64
743 - bundle_windows_x86_64
744 if: always()
745 runs-on: namespace-profile-2x4-ubuntu-2404
746 steps:
747 - id: generate-webhook-message
748 name: release::generate_slack_message
749 run: |
750 MESSAGE=$(TAG="$GITHUB_REF_NAME"
751
752 if [ "$DRAFT_RESULT" == "failure" ]; then
753 echo "❌ Draft release creation failed for $TAG: $RUN_URL"
754 else
755 RELEASE_URL=$(gh release view "$TAG" --repo=zed-industries/zed --json url -q '.url')
756 if [ "$UPLOAD_RESULT" == "failure" ]; then
757 echo "❌ Release asset upload failed for $TAG: $RELEASE_URL"
758 elif [ "$UPLOAD_RESULT" == "cancelled" ] || [ "$UPLOAD_RESULT" == "skipped" ]; then
759 FAILED_JOBS=""
760 if [ "$RESULT_RUN_TESTS_MAC" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_mac"; fi
761 if [ "$RESULT_RUN_TESTS_LINUX" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_linux"; fi
762 if [ "$RESULT_RUN_TESTS_WINDOWS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_windows"; fi
763 if [ "$RESULT_CLIPPY_MAC" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_mac"; fi
764 if [ "$RESULT_CLIPPY_LINUX" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_linux"; fi
765 if [ "$RESULT_CLIPPY_WINDOWS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_windows"; fi
766 if [ "$RESULT_CHECK_SCRIPTS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS check_scripts"; fi
767 if [ "$RESULT_BUNDLE_LINUX_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_linux_aarch64"; fi
768 if [ "$RESULT_BUNDLE_LINUX_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_linux_x86_64"; fi
769 if [ "$RESULT_BUNDLE_MAC_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_mac_aarch64"; fi
770 if [ "$RESULT_BUNDLE_MAC_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_mac_x86_64"; fi
771 if [ "$RESULT_BUNDLE_WINDOWS_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_windows_aarch64"; fi
772 if [ "$RESULT_BUNDLE_WINDOWS_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_windows_x86_64"; fi
773 FAILED_JOBS=$(echo "$FAILED_JOBS" | xargs)
774 if [ "$UPLOAD_RESULT" == "cancelled" ]; then
775 if [ -n "$FAILED_JOBS" ]; then
776 echo "❌ Release job for $TAG was cancelled, most likely because tests \`$FAILED_JOBS\` failed: $RUN_URL"
777 else
778 echo "❌ Release job for $TAG was cancelled: $RUN_URL"
779 fi
780 else
781 if [ -n "$FAILED_JOBS" ]; then
782 echo "❌ Tests \`$FAILED_JOBS\` for $TAG failed: $RUN_URL"
783 else
784 echo "❌ Tests for $TAG failed: $RUN_URL"
785 fi
786 fi
787 elif [ "$VALIDATE_RESULT" == "failure" ]; then
788 echo "❌ Release asset validation failed for $TAG (missing assets): $RUN_URL"
789 elif [ "$AUTO_RELEASE_RESULT" == "success" ]; then
790 echo "✅ Release $TAG was auto-released successfully: $RELEASE_URL"
791 elif [ "$AUTO_RELEASE_RESULT" == "failure" ]; then
792 echo "❌ Auto release failed for $TAG: $RUN_URL"
793 else
794 echo "👀 Release $TAG sitting freshly baked in the oven and waiting to be published: $RELEASE_URL"
795 fi
796 fi
797 )
798 echo "message=$MESSAGE" >> "$GITHUB_OUTPUT"
799 env:
800 GH_TOKEN: ${{ github.token }}
801 DRAFT_RESULT: ${{ needs.create_draft_release.result }}
802 UPLOAD_RESULT: ${{ needs.upload_release_assets.result }}
803 VALIDATE_RESULT: ${{ needs.validate_release_assets.result }}
804 AUTO_RELEASE_RESULT: ${{ needs.auto_release_preview.result }}
805 RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
806 RESULT_RUN_TESTS_MAC: ${{ needs.run_tests_mac.result }}
807 RESULT_RUN_TESTS_LINUX: ${{ needs.run_tests_linux.result }}
808 RESULT_RUN_TESTS_WINDOWS: ${{ needs.run_tests_windows.result }}
809 RESULT_CLIPPY_MAC: ${{ needs.clippy_mac.result }}
810 RESULT_CLIPPY_LINUX: ${{ needs.clippy_linux.result }}
811 RESULT_CLIPPY_WINDOWS: ${{ needs.clippy_windows.result }}
812 RESULT_CHECK_SCRIPTS: ${{ needs.check_scripts.result }}
813 RESULT_BUNDLE_LINUX_AARCH64: ${{ needs.bundle_linux_aarch64.result }}
814 RESULT_BUNDLE_LINUX_X86_64: ${{ needs.bundle_linux_x86_64.result }}
815 RESULT_BUNDLE_MAC_AARCH64: ${{ needs.bundle_mac_aarch64.result }}
816 RESULT_BUNDLE_MAC_X86_64: ${{ needs.bundle_mac_x86_64.result }}
817 RESULT_BUNDLE_WINDOWS_AARCH64: ${{ needs.bundle_windows_aarch64.result }}
818 RESULT_BUNDLE_WINDOWS_X86_64: ${{ needs.bundle_windows_x86_64.result }}
819 - name: release::send_slack_message
820 run: 'curl -X POST -H ''Content-type: application/json'' --data "$(jq -n --arg text "$SLACK_MESSAGE" ''{"text": $text}'')" "$SLACK_WEBHOOK"'
821 env:
822 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
823 SLACK_MESSAGE: ${{ steps.generate-webhook-message.outputs.message }}
824concurrency:
825 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
826 cancel-in-progress: true
827defaults:
828 run:
829 shell: bash -euxo pipefail {0}