release_nightly.yml

  1# Generated from xtask::workflows::release_nightly
  2# Rebuild with `cargo xtask workflows`.
  3name: release_nightly
  4env:
  5  CARGO_TERM_COLOR: always
  6  RUST_BACKTRACE: '1'
  7on:
  8  push:
  9    tags:
 10    - nightly
 11  schedule:
 12  - cron: 0 7 * * *
 13jobs:
 14  check_style:
 15    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
 16    runs-on: namespace-profile-mac-large
 17    steps:
 18    - name: steps::checkout_repo
 19      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
 20      with:
 21        clean: false
 22        fetch-depth: 0
 23    - name: steps::cargo_fmt
 24      run: cargo fmt --all -- --check
 25    - name: ./script/clippy
 26      run: ./script/clippy
 27    timeout-minutes: 60
 28  run_tests_windows:
 29    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
 30    runs-on: self-32vcpu-windows-2022
 31    steps:
 32    - name: steps::checkout_repo
 33      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
 34      with:
 35        clean: false
 36    - name: steps::setup_cargo_config
 37      run: |
 38        New-Item -ItemType Directory -Path "./../.cargo" -Force
 39        Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
 40      shell: pwsh
 41    - name: steps::setup_node
 42      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 43      with:
 44        node-version: '20'
 45    - name: steps::clear_target_dir_if_large
 46      run: ./script/clear-target-dir-if-larger-than.ps1 350 200
 47      shell: pwsh
 48    - name: steps::setup_sccache
 49      run: ./script/setup-sccache.ps1
 50      shell: pwsh
 51      env:
 52        R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
 53        R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
 54        R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
 55        SCCACHE_BUCKET: sccache-zed
 56    - name: steps::cargo_nextest
 57      run: cargo nextest run --workspace --no-fail-fast --no-tests=warn
 58      shell: pwsh
 59    - name: steps::show_sccache_stats
 60      run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
 61      shell: pwsh
 62    - name: steps::cleanup_cargo_config
 63      if: always()
 64      run: |
 65        Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
 66      shell: pwsh
 67    timeout-minutes: 60
 68  clippy_windows:
 69    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
 70    runs-on: self-32vcpu-windows-2022
 71    steps:
 72    - name: steps::checkout_repo
 73      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
 74      with:
 75        clean: false
 76    - name: steps::setup_cargo_config
 77      run: |
 78        New-Item -ItemType Directory -Path "./../.cargo" -Force
 79        Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
 80      shell: pwsh
 81    - name: steps::setup_sccache
 82      run: ./script/setup-sccache.ps1
 83      shell: pwsh
 84      env:
 85        R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
 86        R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
 87        R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
 88        SCCACHE_BUCKET: sccache-zed
 89    - name: steps::clippy
 90      run: ./script/clippy.ps1
 91      shell: pwsh
 92    - name: steps::show_sccache_stats
 93      run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
 94      shell: pwsh
 95    timeout-minutes: 60
 96  bundle_linux_aarch64:
 97    needs:
 98    - check_style
 99    - run_tests_windows
100    - clippy_windows
101    runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
102    env:
103      CARGO_INCREMENTAL: 0
104      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
105      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
106      CC: clang-18
107      CXX: clang++-18
108    steps:
109    - name: steps::checkout_repo
110      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
111      with:
112        clean: false
113    - name: run_bundling::set_release_channel_to_nightly
114      run: |
115        set -eu
116        version=$(git rev-parse --short HEAD)
117        echo "Publishing version: ${version} on release channel nightly"
118        echo "nightly" > crates/zed/RELEASE_CHANNEL
119    - name: steps::setup_sentry
120      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
121      with:
122        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
123    - name: steps::setup_linux
124      run: ./script/linux
125    - name: steps::download_wasi_sdk
126      run: ./script/download-wasi-sdk
127    - name: ./script/bundle-linux
128      run: ./script/bundle-linux
129    - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
130      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
131      with:
132        name: zed-linux-aarch64.tar.gz
133        path: target/release/zed-linux-aarch64.tar.gz
134        if-no-files-found: error
135    - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
136      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
137      with:
138        name: zed-remote-server-linux-aarch64.gz
139        path: target/zed-remote-server-linux-aarch64.gz
140        if-no-files-found: error
141    timeout-minutes: 60
142  bundle_linux_x86_64:
143    needs:
144    - check_style
145    - run_tests_windows
146    - clippy_windows
147    runs-on: namespace-profile-32x64-ubuntu-2004
148    env:
149      CARGO_INCREMENTAL: 0
150      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
151      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
152      CC: clang-18
153      CXX: clang++-18
154    steps:
155    - name: steps::checkout_repo
156      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
157      with:
158        clean: false
159    - name: run_bundling::set_release_channel_to_nightly
160      run: |
161        set -eu
162        version=$(git rev-parse --short HEAD)
163        echo "Publishing version: ${version} on release channel nightly"
164        echo "nightly" > crates/zed/RELEASE_CHANNEL
165    - name: steps::setup_sentry
166      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
167      with:
168        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
169    - name: steps::setup_linux
170      run: ./script/linux
171    - name: steps::download_wasi_sdk
172      run: ./script/download-wasi-sdk
173    - name: ./script/bundle-linux
174      run: ./script/bundle-linux
175    - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
176      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
177      with:
178        name: zed-linux-x86_64.tar.gz
179        path: target/release/zed-linux-x86_64.tar.gz
180        if-no-files-found: error
181    - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
182      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
183      with:
184        name: zed-remote-server-linux-x86_64.gz
185        path: target/zed-remote-server-linux-x86_64.gz
186        if-no-files-found: error
187    timeout-minutes: 60
188  bundle_mac_aarch64:
189    needs:
190    - check_style
191    - run_tests_windows
192    - clippy_windows
193    runs-on: namespace-profile-mac-large
194    env:
195      CARGO_INCREMENTAL: 0
196      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
197      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
198      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
199      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
200      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
201      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
202      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
203    steps:
204    - name: steps::checkout_repo
205      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
206      with:
207        clean: false
208    - name: run_bundling::set_release_channel_to_nightly
209      run: |
210        set -eu
211        version=$(git rev-parse --short HEAD)
212        echo "Publishing version: ${version} on release channel nightly"
213        echo "nightly" > crates/zed/RELEASE_CHANNEL
214    - name: steps::setup_node
215      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
216      with:
217        node-version: '20'
218    - name: steps::setup_sentry
219      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
220      with:
221        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
222    - name: steps::clear_target_dir_if_large
223      run: ./script/clear-target-dir-if-larger-than 350 200
224    - name: run_bundling::bundle_mac::bundle_mac
225      run: ./script/bundle-mac aarch64-apple-darwin
226    - name: '@actions/upload-artifact Zed-aarch64.dmg'
227      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
228      with:
229        name: Zed-aarch64.dmg
230        path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
231        if-no-files-found: error
232    - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
233      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
234      with:
235        name: zed-remote-server-macos-aarch64.gz
236        path: target/zed-remote-server-macos-aarch64.gz
237        if-no-files-found: error
238    timeout-minutes: 60
239  bundle_mac_x86_64:
240    needs:
241    - check_style
242    - run_tests_windows
243    - clippy_windows
244    runs-on: namespace-profile-mac-large
245    env:
246      CARGO_INCREMENTAL: 0
247      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
248      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
249      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
250      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
251      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
252      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
253      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
254    steps:
255    - name: steps::checkout_repo
256      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
257      with:
258        clean: false
259    - name: run_bundling::set_release_channel_to_nightly
260      run: |
261        set -eu
262        version=$(git rev-parse --short HEAD)
263        echo "Publishing version: ${version} on release channel nightly"
264        echo "nightly" > crates/zed/RELEASE_CHANNEL
265    - name: steps::setup_node
266      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
267      with:
268        node-version: '20'
269    - name: steps::setup_sentry
270      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
271      with:
272        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
273    - name: steps::clear_target_dir_if_large
274      run: ./script/clear-target-dir-if-larger-than 350 200
275    - name: run_bundling::bundle_mac::bundle_mac
276      run: ./script/bundle-mac x86_64-apple-darwin
277    - name: '@actions/upload-artifact Zed-x86_64.dmg'
278      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
279      with:
280        name: Zed-x86_64.dmg
281        path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
282        if-no-files-found: error
283    - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
284      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
285      with:
286        name: zed-remote-server-macos-x86_64.gz
287        path: target/zed-remote-server-macos-x86_64.gz
288        if-no-files-found: error
289    timeout-minutes: 60
290  bundle_windows_aarch64:
291    needs:
292    - check_style
293    - run_tests_windows
294    - clippy_windows
295    runs-on: self-32vcpu-windows-2022
296    env:
297      CARGO_INCREMENTAL: 0
298      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
299      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
300      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
301      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
302      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
303      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
304      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
305      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
306      FILE_DIGEST: SHA256
307      TIMESTAMP_DIGEST: SHA256
308      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
309    steps:
310    - name: steps::checkout_repo
311      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
312      with:
313        clean: false
314    - name: run_bundling::set_release_channel_to_nightly
315      run: |
316        $ErrorActionPreference = "Stop"
317        $version = git rev-parse --short HEAD
318        Write-Host "Publishing version: $version on release channel nightly"
319        "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
320      shell: pwsh
321      working-directory: ${{ env.ZED_WORKSPACE }}
322    - name: steps::setup_sentry
323      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
324      with:
325        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
326    - name: run_bundling::bundle_windows::bundle_windows
327      run: script/bundle-windows.ps1 -Architecture aarch64
328      shell: pwsh
329      working-directory: ${{ env.ZED_WORKSPACE }}
330    - name: '@actions/upload-artifact Zed-aarch64.exe'
331      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
332      with:
333        name: Zed-aarch64.exe
334        path: target/Zed-aarch64.exe
335        if-no-files-found: error
336    - name: '@actions/upload-artifact zed-remote-server-windows-aarch64.zip'
337      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
338      with:
339        name: zed-remote-server-windows-aarch64.zip
340        path: target/zed-remote-server-windows-aarch64.zip
341        if-no-files-found: error
342    timeout-minutes: 60
343  bundle_windows_x86_64:
344    needs:
345    - check_style
346    - run_tests_windows
347    - clippy_windows
348    runs-on: self-32vcpu-windows-2022
349    env:
350      CARGO_INCREMENTAL: 0
351      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
352      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
353      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
354      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
355      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
356      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
357      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
358      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
359      FILE_DIGEST: SHA256
360      TIMESTAMP_DIGEST: SHA256
361      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
362    steps:
363    - name: steps::checkout_repo
364      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
365      with:
366        clean: false
367    - name: run_bundling::set_release_channel_to_nightly
368      run: |
369        $ErrorActionPreference = "Stop"
370        $version = git rev-parse --short HEAD
371        Write-Host "Publishing version: $version on release channel nightly"
372        "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
373      shell: pwsh
374      working-directory: ${{ env.ZED_WORKSPACE }}
375    - name: steps::setup_sentry
376      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
377      with:
378        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
379    - name: run_bundling::bundle_windows::bundle_windows
380      run: script/bundle-windows.ps1 -Architecture x86_64
381      shell: pwsh
382      working-directory: ${{ env.ZED_WORKSPACE }}
383    - name: '@actions/upload-artifact Zed-x86_64.exe'
384      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
385      with:
386        name: Zed-x86_64.exe
387        path: target/Zed-x86_64.exe
388        if-no-files-found: error
389    - name: '@actions/upload-artifact zed-remote-server-windows-x86_64.zip'
390      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
391      with:
392        name: zed-remote-server-windows-x86_64.zip
393        path: target/zed-remote-server-windows-x86_64.zip
394        if-no-files-found: error
395    timeout-minutes: 60
396  build_nix_linux_x86_64:
397    needs:
398    - check_style
399    - run_tests_windows
400    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
401    runs-on: namespace-profile-32x64-ubuntu-2004
402    env:
403      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
404      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
405      ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
406      GIT_LFS_SKIP_SMUDGE: '1'
407    steps:
408    - name: steps::checkout_repo
409      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
410      with:
411        clean: false
412    - name: steps::cache_nix_dependencies_namespace
413      uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
414      with:
415        cache: nix
416    - name: nix_build::build_nix::install_nix
417      uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
418      with:
419        github_access_token: ${{ secrets.GITHUB_TOKEN }}
420    - name: nix_build::build_nix::cachix_action
421      uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
422      with:
423        name: zed
424        authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
425        cachixArgs: -v
426    - name: nix_build::build_nix::build
427      run: nix build .#default -L --accept-flake-config
428    timeout-minutes: 60
429    continue-on-error: true
430  build_nix_mac_aarch64:
431    needs:
432    - check_style
433    - run_tests_windows
434    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
435    runs-on: namespace-profile-mac-large
436    env:
437      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
438      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
439      ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
440      GIT_LFS_SKIP_SMUDGE: '1'
441    steps:
442    - name: steps::checkout_repo
443      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
444      with:
445        clean: false
446    - name: steps::cache_nix_store_macos
447      uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
448      with:
449        path: ~/nix-cache
450    - name: nix_build::build_nix::install_nix
451      uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
452      with:
453        github_access_token: ${{ secrets.GITHUB_TOKEN }}
454    - name: nix_build::build_nix::configure_local_nix_cache
455      run: |
456        mkdir -p ~/nix-cache
457        echo "extra-substituters = file://$HOME/nix-cache?priority=10" | sudo tee -a /etc/nix/nix.conf
458        echo "require-sigs = false" | sudo tee -a /etc/nix/nix.conf
459        sudo launchctl kickstart -k system/org.nixos.nix-daemon
460    - name: nix_build::build_nix::cachix_action
461      uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
462      with:
463        name: zed
464        authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
465        cachixArgs: -v
466    - name: nix_build::build_nix::build
467      run: nix build .#default -L --accept-flake-config
468    - name: nix_build::build_nix::export_to_local_nix_cache
469      if: always()
470      run: |
471        if [ -L result ]; then
472          echo "Copying build closure to local binary cache..."
473          nix copy --to "file://$HOME/nix-cache" ./result || echo "Warning: nix copy to local cache failed"
474        else
475          echo "No build result found, skipping cache export."
476        fi
477    timeout-minutes: 60
478    continue-on-error: true
479  update_nightly_tag:
480    needs:
481    - bundle_linux_aarch64
482    - bundle_linux_x86_64
483    - bundle_mac_aarch64
484    - bundle_mac_x86_64
485    - bundle_windows_aarch64
486    - bundle_windows_x86_64
487    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
488    runs-on: namespace-profile-4x8-ubuntu-2204
489    steps:
490    - name: steps::checkout_repo
491      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
492      with:
493        clean: false
494        fetch-depth: 0
495    - name: release::download_workflow_artifacts
496      uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
497      with:
498        path: ./artifacts/
499    - name: ls -lR ./artifacts
500      run: ls -lR ./artifacts
501    - name: release::prep_release_artifacts
502      run: |-
503        mkdir -p release-artifacts/
504
505        mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
506        mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
507        mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
508        mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
509        mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
510        mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
511        mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
512        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
513        mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
514        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
515        mv ./artifacts/zed-remote-server-windows-aarch64.zip/zed-remote-server-windows-aarch64.zip release-artifacts/zed-remote-server-windows-aarch64.zip
516        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
517    - name: ./script/upload-nightly
518      run: ./script/upload-nightly
519      env:
520        DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
521        DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
522    - name: release_nightly::update_nightly_tag_job::update_nightly_tag
523      run: |
524        if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
525          echo "Nightly tag already points to current commit. Skipping tagging."
526          exit 0
527        fi
528        git config user.name github-actions
529        git config user.email github-actions@github.com
530        git tag -f nightly
531        git push origin nightly --force
532    - name: release::create_sentry_release
533      uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
534      with:
535        environment: production
536      env:
537        SENTRY_ORG: zed-dev
538        SENTRY_PROJECT: zed
539        SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
540    timeout-minutes: 60
541  notify_on_failure:
542    needs:
543    - bundle_linux_aarch64
544    - bundle_linux_x86_64
545    - bundle_mac_aarch64
546    - bundle_mac_x86_64
547    - bundle_windows_aarch64
548    - bundle_windows_x86_64
549    if: failure()
550    runs-on: namespace-profile-2x4-ubuntu-2404
551    steps:
552    - name: release::send_slack_message
553      run: 'curl -X POST -H ''Content-type: application/json'' --data "$(jq -n --arg text "$SLACK_MESSAGE" ''{"text": $text}'')" "$SLACK_WEBHOOK"'
554      env:
555        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
556        SLACK_MESSAGE: '❌ ${{ github.workflow }} failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
557defaults:
558  run:
559    shell: bash -euxo pipefail {0}