Skip to content

Commit

Permalink
Add LSP to the GH Actions build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Dec 31, 2024
1 parent c6d8a9f commit 4d24da2
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,18 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: gt
cli-name: gt
lsp-name: gts

- os: macos-latest
target: x86_64-apple-darwin
artifact_name: gt
cli-name: gt
lsp-name: gts

- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: gt.exe
cli-name: gt.exe
lsp-name: gts.exe

steps:
- name: Check out repo
Expand All @@ -68,16 +71,30 @@ jobs:
working-directory: cli
run: cargo build --release --target ${{ matrix.target }}

- name: Archive binary
- name: Build LSP
working-directory: lsp
run: cargo build --release --target ${{ matrix.target }}

- name: Archive binaries
if: runner.os != 'Windows'
run: tar -czvf ${{ matrix.artifact_name }}-${{ matrix.os }}.tar.gz -C target/${{ matrix.target }}/release ${{ matrix.artifact_name }}
run:
tar -czvf ${{ matrix.cli-name }}-${{ matrix.os }}.tar.gz -C target/${{ matrix.target }}/release ${{ matrix.cli-name }}
tar -czvf ${{ matrix.lsp-name }}-${{ matrix.os }}.tar.gz -C target/${{ matrix.target }}/release ${{ matrix.lsp-name }}

- name: Archive binary
- name: Archive binaries
if: runner.os == 'Windows'
run: Compress-Archive -Path target\${{ matrix.target }}\release\${{ matrix.artifact_name }} -DestinationPath ${{ matrix.artifact_name }}-${{ matrix.os }}.zip
run:
Compress-Archive -Path target\${{ matrix.target }}\release\${{ matrix.cli-name }} -DestinationPath ${{ matrix.cli-name }}-${{ matrix.os }}.zip
Compress-Archive -Path target\${{ matrix.target }}\release\${{ matrix.lsp-name }} -DestinationPath ${{ matrix.lsp-name }}-${{ matrix.os }}.zip

- name: Upload CLI binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.cli-name }}-${{ matrix.os }}
path: ${{ matrix.cli-name }}-${{ matrix.os }}.*

- name: Upload binaries
- name: Upload LSP binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-${{ matrix.os }}
path: ${{ matrix.artifact_name }}-${{ matrix.os }}.*
name: ${{ matrix.lsp-name }}-${{ matrix.os }}
path: ${{ matrix.lsp-name }}-${{ matrix.os }}.*

0 comments on commit 4d24da2

Please sign in to comment.