From 4d24da211f33d3b1c024578a4665c849db975bdd Mon Sep 17 00:00:00 2001 From: Sasha Koss Date: Tue, 31 Dec 2024 17:25:07 +0800 Subject: [PATCH] Add LSP to the GH Actions build workflow --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68646f2..89cb259 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 }}.*