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 timeout-minutes: 60
19 name: Check formatting and Clippy lints
20 if: github.repository_owner == 'zed-industries'
21 runs-on:
22 - self-hosted
23 - test
24 steps:
25 - name: Checkout repo
26 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27 with:
28 clean: false
29 fetch-depth: 0
30
31 - name: Run style checks
32 uses: ./.github/actions/check_style
33
34 - name: Run clippy
35 run: ./script/clippy
36
37 tests:
38 timeout-minutes: 60
39 name: Run tests
40 if: github.repository_owner == 'zed-industries'
41 runs-on:
42 - self-hosted
43 - test
44 needs: style
45 steps:
46 - name: Checkout repo
47 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
48 with:
49 clean: false
50
51 - name: Run tests
52 uses: ./.github/actions/run_tests
53
54 bundle-mac:
55 timeout-minutes: 60
56 name: Create a macOS bundle
57 if: github.repository_owner == 'zed-industries'
58 runs-on:
59 - self-hosted
60 - bundle
61 needs: tests
62 env:
63 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
64 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
65 APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
66 APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
67 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
68 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
69 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
70 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
71 steps:
72 - name: Install Node
73 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
74 with:
75 node-version: "18"
76
77 - name: Checkout repo
78 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
79 with:
80 clean: false
81
82 - name: Set release channel to nightly
83 run: |
84 set -eu
85 version=$(git rev-parse --short HEAD)
86 echo "Publishing version: ${version} on release channel nightly"
87 echo "nightly" > crates/zed/RELEASE_CHANNEL
88
89 - name: Create macOS app bundle
90 run: script/bundle-mac
91
92 - name: Upload Zed Nightly
93 run: script/upload-nightly macos
94
95 bundle-linux-x86:
96 timeout-minutes: 60
97 name: Create a Linux *.tar.gz bundle for x86
98 if: github.repository_owner == 'zed-industries'
99 runs-on:
100 - buildjet-16vcpu-ubuntu-2004
101 needs: tests
102 env:
103 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
104 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
105 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
106 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
107 steps:
108 - name: Checkout repo
109 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
110 with:
111 clean: false
112
113 - name: Add Rust to the PATH
114 run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
115
116 - name: Install Linux dependencies
117 run: ./script/linux && ./script/install-mold 2.34.0
118
119 - name: Limit target directory size
120 run: script/clear-target-dir-if-larger-than 100
121
122 - name: Set release channel to nightly
123 run: |
124 set -euo pipefail
125 version=$(git rev-parse --short HEAD)
126 echo "Publishing version: ${version} on release channel nightly"
127 echo "nightly" > crates/zed/RELEASE_CHANNEL
128
129 - name: Create Linux .tar.gz bundle
130 run: script/bundle-linux
131
132 - name: Upload Zed Nightly
133 run: script/upload-nightly linux-targz
134
135 bundle-linux-arm:
136 timeout-minutes: 60
137 name: Create a Linux *.tar.gz bundle for ARM
138 if: github.repository_owner == 'zed-industries'
139 runs-on:
140 - buildjet-16vcpu-ubuntu-2204-arm
141 needs: tests
142 env:
143 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
144 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
145 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
146 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
147 steps:
148 - name: Checkout repo
149 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
150 with:
151 clean: false
152
153 - name: Install Linux dependencies
154 run: ./script/linux
155
156 - name: Limit target directory size
157 run: script/clear-target-dir-if-larger-than 100
158
159 - name: Set release channel to nightly
160 run: |
161 set -euo pipefail
162 version=$(git rev-parse --short HEAD)
163 echo "Publishing version: ${version} on release channel nightly"
164 echo "nightly" > crates/zed/RELEASE_CHANNEL
165
166 - name: Create Linux .tar.gz bundle
167 run: script/bundle-linux
168
169 - name: Upload Zed Nightly
170 run: script/upload-nightly linux-targz
171
172 update-nightly-tag:
173 name: Update nightly tag
174 if: github.repository_owner == 'zed-industries'
175 runs-on: ubuntu-latest
176 needs:
177 - bundle-mac
178 - bundle-linux-x86
179 - bundle-linux-arm
180 steps:
181 - name: Checkout repo
182 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
183 with:
184 fetch-depth: 0
185
186 - name: Update nightly tag
187 run: |
188 if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
189 echo "Nightly tag already points to current commit. Skipping tagging."
190 exit 0
191 fi
192 git config user.name github-actions
193 git config user.email github-actions@github.com
194 git tag -f nightly
195 git push origin nightly --force