Skip to content

Build Zed

Build Zed #96

Workflow file for this run

name: Build Zed
on:
push:
tags:
- 'v*'
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
permissions:
contents: write
id-token: write
attestations: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
repository: zed-industries/zed
- name: Set git config for long paths
run: git config --system core.longpaths true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Add WASM target
run: rustup target add wasm32-wasi
- name: Install C++ build tools
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Run cargo
run: cargo build --release
- name: Compress binary
uses: svenstaro/upx-action@v2
with:
files: |
target/release/Zed.exe
- name: Get latest commit
shell: pwsh
id: commit_message
run: |
$GIT_MESSAGE = git log -1 --pretty
echo "GIT_MESSAGE=$GIT_MESSAGE" >> $env:GITHUB_ENV
echo "GIT_MESSAGE=$GIT_MESSAGE" >> $env:GITHUB_OUTPUT
- name: Zip the thing
run: |
Compress-Archive -Path target/release/Zed.exe -DestinationPath Zed.zip
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: zed.exe
path: target\release\Zed.exe
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: zed.zip
path: Zed.zip
- name: Update Nightly Current
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/auto-release')
with:
name: Nightly Build
body: "Releasing ${{ steps.commit_message.outputs.GIT_MESSAGE }}"
tag_name: nightly
prerelease: true
files: |
target/release/Zed.exe
Zed.zip