-
Notifications
You must be signed in to change notification settings - Fork 54
80 lines (66 loc) · 1.92 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build Zed Nightly
on:
schedule:
- cron: "0 0 * * *" # Runs every night at midnight UTC
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Enable long paths in Git
run: |
git config --system core.longpaths true
- name: Enable long paths in Windows
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: zed-industries/zed
ref: main
- name: Install rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: wasm32-wasi
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: zed-release
path: target/release/zed.exe
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download release artifact
uses: actions/download-artifact@v4
with:
name: zed-release
path: zed-release
- name: Get the current date
id: date
run: echo "CURRENT_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Zip the release artifact
run: zip -r zed-windows.zip zed-release/*
- name: Upload release build artifact to GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.CURRENT_DATE }}
tag_name: ${{ env.CURRENT_DATE }}
draft: false
make_latest: true
files: zed-windows.zip