Skip to content

fix: upload LSP binaries to release instead of VSIX #166

fix: upload LSP binaries to release instead of VSIX

fix: upload LSP binaries to release instead of VSIX #166

Workflow file for this run

name: Build Test
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.6'
- name: Get dependencies
run: go mod download
- name: Run tests
run: go test -v ./...
- name: Build main binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
if [ "$GOOS" = "windows" ]; then
go build -o zy-${{ matrix.goos }}-${{ matrix.goarch }}.exe .
else
go build -o zy-${{ matrix.goos }}-${{ matrix.goarch }} .
fi
- name: Build LSP binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
cd tools/lsp
if [ "$GOOS" = "windows" ]; then
go build -o ../../zy-lsp-${{ matrix.goos }}-${{ matrix.goarch }}.exe .
else
go build -o ../../zy-lsp-${{ matrix.goos }}-${{ matrix.goarch }} .
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: zy-${{ matrix.goos }}-${{ matrix.goarch }}
path: zy-*
retention-days: 7