From 1a5617e5f904b0d42dfbacd2917da28eb45b30e0 Mon Sep 17 00:00:00 2001 From: Mattias Aabmets Date: Fri, 30 Jan 2026 15:31:47 +0200 Subject: [PATCH 1/3] Release workflow now skips Cargo crate publishing if CARGO_REGISTRY_TOKEN is missing --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e4841c..252cb4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,7 @@ jobs: outputs: version: ${{ steps.check.outputs.version }} is_release: ${{ steps.check.outputs.is_release }} + has_token: ${{ steps.check.outputs.has_token }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -65,12 +66,19 @@ jobs: echo "â„šī¸ Version normalized to: $version" fi + has_token="false" + if [ -n "${{ secrets.CARGO_REGISTRY_TOKEN }}" ]; then + has_token="true" + fi + echo "version=$version" >> $GITHUB_OUTPUT echo "is_release=$is_release" >> $GITHUB_OUTPUT + echo "has_token=$has_token" >> $GITHUB_OUTPUT echo "📊 Build Summary:" echo " - Version: $version" echo " - Is release: $is_release" + echo " - Publish crate: $has_token" build: name: Build (${{ matrix.os_name }}-${{ matrix.arch }}) @@ -424,7 +432,7 @@ jobs: name: Publish to crates.io needs: [ build-check, build ] runs-on: ubuntu-latest - if: needs.build-check.outputs.is_release == 'true' + if: needs.build-check.outputs.is_release == 'true' && needs.build-check.outputs.has_token == 'true' steps: - name: Checkout repository uses: actions/checkout@v4 From b4f90bc09fc28bd3a7570f2270724ba813f471bc Mon Sep 17 00:00:00 2001 From: Mattias Aabmets Date: Fri, 30 Jan 2026 16:03:04 +0200 Subject: [PATCH 2/3] Dynamically link amd64 linux build on lower Ubuntu version for better glibc compatibility, add statically-linked musl compilation targets --- .github/workflows/release.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 252cb4f..e93410a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,7 +91,7 @@ jobs: matrix: include: # Linux - - os: ubuntu-latest + - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu os_name: linux arch: amd64 @@ -104,6 +104,20 @@ jobs: artifact_name: rc cross: true + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + os_name: linux + arch: amd64-musl + artifact_name: rc + cross: false + + - os: ubuntu-latest + target: aarch64-unknown-linux-musl + os_name: linux + arch: arm64-musl + artifact_name: rc + cross: true + # macOS (both targets built on ARM64 runner with cross-compilation) - os: macos-latest target: x86_64-apple-darwin @@ -138,6 +152,9 @@ jobs: with: key: ${{ matrix.target }} + - name: Add Rust target + run: rustup target add ${{ matrix.target }} + # Install cross for cross-compilation - name: Install cross if: matrix.cross @@ -415,7 +432,7 @@ jobs: ```bash brew tap rustfs/homebrew-tap - + brew install rustfs/tap/rc ``` From ef9ecaa0446e57c2e4656bbc53bc01a7665214ce Mon Sep 17 00:00:00 2001 From: Mattias Aabmets Date: Fri, 30 Jan 2026 16:13:35 +0200 Subject: [PATCH 3/3] Add build step to install missing musl-tool dependencies for musl targets --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e93410a..1939336 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,6 +155,10 @@ jobs: - name: Add Rust target run: rustup target add ${{ matrix.target }} + - name: Install musl-tools + if: contains(matrix.target, 'musl') + run: sudo apt-get update && sudo apt-get install -y musl-tools + # Install cross for cross-compilation - name: Install cross if: matrix.cross