1name: Release Nightly
2
3on:
4 schedule:
5 # Fire every day at 7:00am UTC (Roughly before EU workday and after US workday)
6 - cron: "0 7 * * *"
7 push:
8 tags:
9 - "nightly"
10
11env:
12 CARGO_TERM_COLOR: always
13 CARGO_INCREMENTAL: 0
14 RUST_BACKTRACE: 1
15
16jobs:
17 style:
18 name: Check formatting and Clippy lints
19 if: github.repository_owner == 'zed-industries'
20 runs-on:
21 - self-hosted
22 - test
23 steps:
24 - name: Checkout repo
25 uses: actions/checkout@v4
26 with:
27 clean: false
28 fetch-depth: 0
29
30 - name: Run style checks
31 uses: ./.github/actions/check_style
32
33 - name: Run clippy
34 run: cargo xtask clippy
35 tests:
36 name: Run tests
37 if: github.repository_owner == 'zed-industries'
38 runs-on:
39 - self-hosted
40 - test
41 needs: style
42 steps:
43 - name: Checkout repo
44 uses: actions/checkout@v4
45 with:
46 clean: false
47
48 - name: Run tests
49 uses: ./.github/actions/run_tests
50
51 bundle-mac:
52 name: Create a macOS bundle
53 if: github.repository_owner == 'zed-industries'
54 runs-on:
55 - self-hosted
56 - bundle
57 needs: tests
58 env:
59 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
60 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
61 APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
62 APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
63 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
64 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
65 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
66 steps:
67 - name: Install Node
68 uses: actions/setup-node@v4
69 with:
70 node-version: "18"
71
72 - name: Checkout repo
73 uses: actions/checkout@v4
74 with:
75 clean: false
76
77 - name: Set release channel to nightly
78 run: |
79 set -eu
80 version=$(git rev-parse --short HEAD)
81 echo "Publishing version: ${version} on release channel nightly"
82 echo "nightly" > crates/zed/RELEASE_CHANNEL
83
84 - name: Generate license file
85 run: script/generate-licenses
86
87 - name: Create macOS app bundle
88 run: script/bundle-mac
89
90 - name: Upload Zed Nightly
91 run: script/upload-nightly macos
92
93 bundle-deb:
94 name: Create a Linux *.tar.gz bundle
95 if: github.repository_owner == 'zed-industries'
96 runs-on:
97 - self-hosted
98 - deploy
99 needs: tests
100 env:
101 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
102 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
103 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
104 steps:
105 - name: Checkout repo
106 uses: actions/checkout@v4
107 with:
108 clean: false
109
110 - name: Add Rust to the PATH
111 run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
112
113 - name: Set release channel to nightly
114 run: |
115 set -euo pipefail
116 version=$(git rev-parse --short HEAD)
117 echo "Publishing version: ${version} on release channel nightly"
118 echo "nightly" > crates/zed/RELEASE_CHANNEL
119
120 - name: Generate license file
121 run: script/generate-licenses
122
123 - name: Create Linux .tar.gz bundle
124 run: script/bundle-linux
125
126 - name: Upload Zed Nightly
127 run: script/upload-nightly linux-targz