forked from TakumiBC/zed-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 2.09 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
name: Build Zed for Windows
on:
workflow_dispatch:
schedule:
# github actions timezone is UTC
- cron: "0 22 * * *"
jobs:
Build:
runs-on: windows-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Install Toolchain
run: rustup target add wasm32-wasi
- name: Clone Source Code
run: |
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
git config --global user.name github-actions[bot]
git clone https://github.com/zed-industries/zed -b main zed
# add Rust cache
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
zed/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Executable
run: |
cd zed
cargo build --release --verbose
- name: Compile Setup Wizard
uses: Minionguyjpro/[email protected]
with:
path: zed_wizard.iss
options: /O+
- name: Rename Setup Wizard
run: |
$date = Get-Date -Format "yyyy-MM-dd"
Rename-Item -Path "Output\zed_setup.exe" -NewName "zed-setup-nightly-$date.exe"
- name: Generate Release Tag
id: tag
run: |
$date = Get-Date -Format "yyyy-MM-dd"
echo "release_tag=$date" >> $env:GITHUB_OUTPUT
echo "release_date=$date" >> $env:GITHUB_OUTPUT
- name: Upload to Releases
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.tag.outputs.release_date }} Zed Windows
tag_name: ${{ steps.tag.outputs.release_tag }}
files: Output/zed-setup-nightly-${{ steps.tag.outputs.release_date }}.exe