-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (67 loc) · 2.12 KB
/
build-zed.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
81
name: Build Zed
on:
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: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run cargo
run: cargo build --release
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: 'target\release\Zed.exe'
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: zed
path: target\release\Zed.exe
- name: Set date
id: set-date
shell: pwsh
run: |
$CURRENT_DATE = Get-Date -UFormat "%Y.%m.%d"
echo "CURRENT_DATE=$CURRENT_DATE" >> $env:GITHUB_ENV
echo "CURRENT_DATE=$CURRENT_DATE" >> $env:GITHUB_OUTPUT
- 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 - Current
body: This release always contains the newest nightly artifacts.
tag_name: nightly
prerelease: true
files: |
target/release/Zed.exe
- name: Release Nightly
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/auto-release')
with:
name: Nightly ${{ steps.set-date.outputs.CURRENT_DATE }}
body: Automated nightly release of Zed
tag_name: "nightly-${{ steps.set-date.outputs.CURRENT_DATE }}"
prerelease: true
files: |
target/release/Zed.exe