-
Notifications
You must be signed in to change notification settings - Fork 38
85 lines (74 loc) · 2.39 KB
/
release-proxy.yml
File metadata and controls
85 lines (74 loc) · 2.39 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
name: Release Proxy Binary
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.asset_name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-15
asset_name: java-lsp-proxy-darwin-aarch64.tar.gz
- target: x86_64-apple-darwin
runner: macos-15-intel
asset_name: java-lsp-proxy-darwin-x86_64.tar.gz
- target: x86_64-unknown-linux-gnu
runner: ubuntu-22.04
asset_name: java-lsp-proxy-linux-x86_64.tar.gz
- target: aarch64-unknown-linux-gnu
runner: ubuntu-22.04-arm
asset_name: java-lsp-proxy-linux-aarch64.tar.gz
- target: x86_64-pc-windows-msvc
runner: windows-latest
asset_name: java-lsp-proxy-windows-x86_64.zip
- target: aarch64-pc-windows-msvc
runner: windows-11-arm
asset_name: java-lsp-proxy-windows-aarch64.zip
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build proxy binary
working-directory: proxy
run: cargo build --release --target ${{ matrix.target }}
shell: bash
- name: Package binary (Unix)
if: runner.os != 'Windows'
run: |
tar -czf ${{ matrix.asset_name }} \
-C target/${{ matrix.target }}/release \
java-lsp-proxy
- name: Package binary (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/java-lsp-proxy.exe -DestinationPath ${{ matrix.asset_name }}
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.asset_name }}
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/*