on master help sign in
Build and release htmlang-lsp alongside htmlang for all platforms
commita9313d2e74230f1c276bb4b627e51a5e146d3fad authoriko <mail@iko.soy> dateTue 14 Apr 2026, 13:59 (6 months ago) parentc05aa33
1 file changed+20−8
.github/workflows/release.yml+20−8
.github/workflows/release.yml+20−8
@@ -15,15 +15,19 @@ jobs:
1515 - os: ubuntu-latest
1616 target: x86_64-unknown-linux-gnu
1717 name: htmlang-linux-x86_64
18+ lsp_name: htmlang-lsp-linux-x86_64
1819 - os: macos-latest
1920 target: x86_64-apple-darwin
2021 name: htmlang-macos-x86_64
22+ lsp_name: htmlang-lsp-macos-x86_64
2123 - os: macos-latest
2224 target: aarch64-apple-darwin
2325 name: htmlang-macos-aarch64
26+ lsp_name: htmlang-lsp-macos-aarch64
2427 - os: windows-latest
2528 target: x86_64-pc-windows-msvc
2629 name: htmlang-windows-x86_64.exe
30+ lsp_name: htmlang-lsp-windows-x86_64.exe
2731 steps:
2832 - uses: actions/checkout@v4
2933
@@ -31,22 +35,30 @@ jobs:
3135 with:
3236 targets: ${{ matrix.target }}
3337
34− - name: Build binary
38+ - name: Build binaries
3539 run: cargo build --release --target ${{ matrix.target }}
3640
37− - name: Strip binary (Unix)
41+ - name: Strip binaries (Unix)
3842 if: runner.os != 'Windows'
3943 run: |
40− if [ -f target/${{ matrix.target }}/release/htmlang ]; then
41− strip target/${{ matrix.target }}/release/htmlang
42− fi
44+ for bin in htmlang htmlang-lsp; do
45+ if [ -f target/${{ matrix.target }}/release/$bin ]; then
46+ strip target/${{ matrix.target }}/release/$bin
47+ fi
48+ done
4349
44− - name: Upload artifact
50+ - name: Upload htmlang
4551 uses: actions/upload-artifact@v4
4652 with:
4753 name: ${{ matrix.name }}
4854 path: target/${{ matrix.target }}/release/htmlang${{ runner.os == 'Windows' && '.exe' || '' }}
4955
56+ - name: Upload htmlang-lsp
57+ uses: actions/upload-artifact@v4
58+ with:
59+ name: ${{ matrix.lsp_name }}
60+ path: target/${{ matrix.target }}/release/htmlang-lsp${{ runner.os == 'Windows' && '.exe' || '' }}
61+
5062 release:
5163 name: Create Release
5264 needs: build
@@ -74,8 +86,8 @@ jobs:
7486 for dir in artifacts/*/; do
7587 filename=$(basename "$dir")
7688 binary=$(find "$dir" -type f -executable | head -1)
77− if [ -z "$binary" ] && [ -f "$dir/htmlang.exe" ]; then
78− binary="$dir/htmlang.exe"
89+ if [ -z "$binary" ]; then
90+ binary=$(find "$dir" -type f -name "*.exe" | head -1)
7991 fi
8092 if [ -n "$binary" ]; then
8193 cp "$binary" "release/$filename"