An open-source cross-platform alternative to AirDrop
feat: Add support for Alpine Linux CLI (#3752)
Julian Xhokaxhiu12d127724828
diff --git a/.github/workflows/build_linux_cli.yml b/.github/workflows/build_linux_cli.ymlindex a51858ba..f25d01b0 100644--- a/.github/workflows/build_linux_cli.yml+++ b/.github/workflows/build_linux_cli.yml@@ -27,22 +27,42 @@ jobs:include:- runner: ubuntu-22.04suffix: linux-x86-64+ target: x86_64-unknown-linux-gnu- runner: ubuntu-22.04-armsuffix: linux-arm-64+ target: aarch64-unknown-linux-gnu+ - runner: ubuntu-22.04+ suffix: linux-x86-64-musl+ target: x86_64-unknown-linux-musl+ - runner: ubuntu-22.04-arm+ suffix: linux-arm-64-musl+ target: aarch64-unknown-linux-muslruns-on: ${{ matrix.runner }}steps:- uses: actions/checkout@v6- name: Install Rust- run: rustup toolchain install # version from rust-toolchain.toml+ run: |+ rustup toolchain install # version from rust-toolchain.toml+ rustup target add ${{ matrix.target }}++ - name: Install musl tools+ if: endsWith(matrix.target, '-musl')+ run: sudo apt-get update && sudo apt-get install -y musl-tools- name: Compile CLI- run: cargo build --release --package localsend-cli+ env:+ CC: ${{ endsWith(matrix.target, '-musl') && 'musl-gcc' || 'gcc' }}+ run: cargo build --release --package localsend-cli --target ${{ matrix.target }}++ - name: Test CLI on Alpine+ if: endsWith(matrix.target, '-musl')+ run: docker run --rm -v "$PWD/target/${{ matrix.target }}/release:/cli:ro" alpine:latest /cli/localsend-cli --help# tar preserves the executable bit, which a bare artifact upload would lose- name: Create tar.gz archive- run: tar -czvf LocalSend-CLI-${{ needs.build.outputs.version }}-${{ matrix.suffix }}.tar.gz -C target/release localsend-cli+ run: tar -czvf LocalSend-CLI-${{ needs.build.outputs.version }}-${{ matrix.suffix }}.tar.gz -C target/${{ matrix.target }}/release localsend-cli- name: Upload CLIuses: actions/upload-artifact@v6diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 577f585e..22190d26 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -364,6 +364,40 @@ jobs:asset_name: LocalSend-CLI-${{ steps.get_version.outputs.version }}-linux-arm-64.tar.gzasset_content_type: application/gzip+ # LINUX CLI MUSL (x86_64)+ - name: Download linux musl CLI file+ uses: actions/download-artifact@v7+ with:+ name: cli-linux-x86-64-musl-result+ path: cli-linux-x86-64-musl-result++ - name: Upload Release Asset+ uses: actions/upload-release-asset@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ upload_url: ${{ steps.draft_release.outputs.upload_url }}+ asset_path: cli-linux-x86-64-musl-result/LocalSend-CLI-${{ steps.get_version.outputs.version }}-linux-x86-64-musl.tar.gz+ asset_name: LocalSend-CLI-${{ steps.get_version.outputs.version }}-linux-x86-64-musl.tar.gz+ asset_content_type: application/gzip++ # LINUX CLI MUSL (arm_64)+ - name: Download linux musl CLI file+ uses: actions/download-artifact@v7+ with:+ name: cli-linux-arm-64-musl-result+ path: cli-linux-arm-64-musl-result++ - name: Upload Release Asset+ uses: actions/upload-release-asset@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ upload_url: ${{ steps.draft_release.outputs.upload_url }}+ asset_path: cli-linux-arm-64-musl-result/LocalSend-CLI-${{ steps.get_version.outputs.version }}-linux-arm-64-musl.tar.gz+ asset_name: LocalSend-CLI-${{ steps.get_version.outputs.version }}-linux-arm-64-musl.tar.gz+ asset_content_type: application/gzip+# WINDOWS CLI EXE (x86_64)- name: Download windows CLI exe fileuses: actions/download-artifact@v7diff --git a/README.md b/README.mdindex b708bc27..386e60b4 100644--- a/README.md+++ b/README.md@@ -170,6 +170,8 @@ To compile LocalSend from the source code, follow these steps:The LocalSend CLI is a terminal client built on LocalSend Protocol v2.+Linux CLI archives on the [releases page](https://github.com/localsend/localsend/releases) are available for x86-64 and ARM64. Use the `-musl.tar.gz` archives for Alpine Linux (static musl binaries); the other Linux CLI archives use glibc.+On macOS and Linux, install the CLI with [Homebrew](https://brew.sh):```shell