release.yml

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