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