-
Notifications
You must be signed in to change notification settings - Fork 47
100 lines (89 loc) · 3.4 KB
/
Copy pathrelease-proxy.yml
File metadata and controls
100 lines (89 loc) · 3.4 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Release Binaries
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Build binaries for ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-15
proxy_asset: java-lsp-proxy-darwin-aarch64.tar.gz
bridge_asset: gradle-lsp-bridge-darwin-aarch64.tar.gz
- target: x86_64-apple-darwin
runner: macos-15-intel
proxy_asset: java-lsp-proxy-darwin-x86_64.tar.gz
bridge_asset: gradle-lsp-bridge-darwin-x86_64.tar.gz
- target: x86_64-unknown-linux-gnu
runner: ubuntu-22.04
proxy_asset: java-lsp-proxy-linux-x86_64.tar.gz
bridge_asset: gradle-lsp-bridge-linux-x86_64.tar.gz
- target: aarch64-unknown-linux-gnu
runner: ubuntu-22.04-arm
proxy_asset: java-lsp-proxy-linux-aarch64.tar.gz
bridge_asset: gradle-lsp-bridge-linux-aarch64.tar.gz
- target: x86_64-pc-windows-msvc
runner: windows-latest
proxy_asset: java-lsp-proxy-windows-x86_64.zip
bridge_asset: gradle-lsp-bridge-windows-x86_64.zip
- target: aarch64-pc-windows-msvc
runner: windows-11-arm
proxy_asset: java-lsp-proxy-windows-aarch64.zip
bridge_asset: gradle-lsp-bridge-windows-aarch64.zip
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# Build both native binaries from the workspace root. Selecting the two
# packages explicitly keeps the WASM extension crate (`zed_java`, a
# cdylib) out of the native target build. The Gradle bridge implements
# vscode-gradle 3.18's JSON-RPC transport over platform-local IPC.
- name: Build binaries
run: cargo build --release --target ${{ matrix.target }} -p java-lsp-proxy -p gradle-lsp-bridge
shell: bash
- name: Package binaries (Unix)
if: runner.os != 'Windows'
run: |
tar -czf ${{ matrix.proxy_asset }} \
-C target/${{ matrix.target }}/release \
java-lsp-proxy
tar -czf ${{ matrix.bridge_asset }} \
-C target/${{ matrix.target }}/release \
gradle-lsp-bridge
- name: Package binaries (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/java-lsp-proxy.exe -DestinationPath ${{ matrix.proxy_asset }}
Compress-Archive -Path target/${{ matrix.target }}/release/gradle-lsp-bridge.exe -DestinationPath ${{ matrix.bridge_asset }}
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: binaries-${{ matrix.target }}
path: |
${{ matrix.proxy_asset }}
${{ matrix.bridge_asset }}
retention-days: 1
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: artifacts/*