chore: bump version to 0.0.5 and update repository URL #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release LSP | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| release: | |
| name: Release LSP - ${{ matrix.os }} (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: linux | |
| arch: x64 | |
| runner: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| binary_name: ci | |
| asset_name: ci-lsp-linux-x64 | |
| - os: linux | |
| arch: arm64 | |
| runner: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| binary_name: ci | |
| asset_name: ci-lsp-linux-arm64 | |
| - os: windows | |
| arch: x64 | |
| runner: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| binary_name: ci.exe | |
| asset_name: ci-lsp-windows-x64.exe | |
| - os: windows | |
| arch: arm64 | |
| runner: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| binary_name: ci.exe | |
| asset_name: ci-lsp-windows-arm64.exe | |
| - os: darwin | |
| arch: x64 | |
| runner: macos-latest | |
| target: x86_64-apple-darwin | |
| binary_name: ci | |
| asset_name: ci-lsp-darwin-x64 | |
| - os: darwin | |
| arch: arm64 | |
| runner: macos-latest | |
| target: aarch64-apple-darwin | |
| binary_name: ci | |
| asset_name: ci-lsp-darwin-arm64 | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v4 | |
| - name: Set variables | |
| id: vars | |
| shell: bash | |
| run: | | |
| echo "package_name=$(sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" >> $GITHUB_OUTPUT | |
| echo "package_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools (Linux ARM64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Configure cross-compilation (Linux ARM64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config.toml | |
| echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config.toml | |
| - name: Cache cargo registry and build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-lsp-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.target }}-cargo-lsp- | |
| - name: Build release binary with LSP feature | |
| run: cargo build --release --features lsp --target ${{ matrix.target }} | |
| - name: Upload binary as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset_name }} | |
| path: target/${{ matrix.target }}/release/${{ matrix.binary_name }} | |
| create-release: | |
| name: Create LSP Release | |
| runs-on: ubuntu-latest | |
| needs: release | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v4 | |
| - name: Set variables | |
| id: vars | |
| run: | | |
| echo "package_name=$(sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" >> $GITHUB_OUTPUT | |
| echo "package_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Remove Same Release | |
| uses: omarabid-forks/action-rollback@stable | |
| continue-on-error: true | |
| with: | |
| tag: ${{ steps.vars.outputs.package_version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release | |
| id: create-release | |
| uses: actions/create-release@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.vars.outputs.package_version }} | |
| release_name: LSP Server ${{ steps.vars.outputs.package_version }} | |
| body: ${{ steps.vars.outputs.package_name }} LSP Server - ${{ steps.vars.outputs.package_version }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload Linux x64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-linux-x64/ci | |
| asset_name: ci-lsp-linux-x64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload Linux arm64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-linux-arm64/ci | |
| asset_name: ci-lsp-linux-arm64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload Windows x64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-windows-x64.exe/ci.exe | |
| asset_name: ci-lsp-windows-x64.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload Windows arm64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-windows-arm64.exe/ci.exe | |
| asset_name: ci-lsp-windows-arm64.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload macOS x64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-darwin-x64/ci | |
| asset_name: ci-lsp-darwin-x64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload macOS arm64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| asset_path: artifacts/ci-lsp-darwin-arm64/ci | |
| asset_name: ci-lsp-darwin-arm64 | |
| asset_content_type: application/octet-stream | |
| - name: Purge artifacts | |
| uses: omarabid-forks/purge-artifacts@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| expire-in: 0 |