From b91c6cb33924bea6b297daed9dab09ffb3840174 Mon Sep 17 00:00:00 2001 From: Alexey <247128645+axkurcom@users.noreply.github.com> Date: Sat, 21 Mar 2026 16:48:42 +0300 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 42 +++++++++++++---------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 198e37a..360da36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,7 +59,6 @@ jobs: image: debian:trixie steps: - name: Install system dependencies - shell: bash run: | set -euo pipefail apt-get update @@ -93,20 +92,15 @@ jobs: checks-${{ runner.os }}- - name: Cargo fetch - shell: bash run: cargo fetch --locked - name: Format - shell: bash run: cargo fmt --all -- --check - name: Clippy - shell: bash - run: | - cargo clippy + run: cargo clippy - name: Tests - shell: bash run: cargo test build-binaries: @@ -134,7 +128,6 @@ jobs: steps: - name: Install system dependencies - shell: bash run: | set -euo pipefail apt-get update @@ -171,18 +164,15 @@ jobs: build-${{ matrix.zig_target }}- - name: Install cargo-zigbuild + Zig - shell: bash run: | set -euo pipefail python3 -m pip install --user --break-system-packages cargo-zigbuild echo "/github/home/.local/bin" >> "$GITHUB_PATH" - name: Cargo fetch - shell: bash run: cargo fetch --locked - name: Build release - shell: bash env: CARGO_PROFILE_RELEASE_LTO: "fat" CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1" @@ -191,27 +181,33 @@ jobs: set -euo pipefail cargo zigbuild --release --locked --target "${{ matrix.zig_target }}" - - name: Strip binary - shell: bash + - name: Debug target dir (optional but useful) run: | set -euo pipefail - llvm-strip "target/${{ matrix.zig_target }}/release/${BINARY_NAME}" || true + ls -lah "target/${{ matrix.rust_target }}/release/" || true + + - name: Strip binary + run: | + set -euo pipefail + llvm-strip "target/${{ matrix.rust_target }}/release/${BINARY_NAME}" || true - name: Inspect binary - shell: bash run: | set -euo pipefail - file "target/${{ matrix.zig_target }}/release/${BINARY_NAME}" + file "target/${{ matrix.rust_target }}/release/${BINARY_NAME}" - name: Package - shell: bash run: | set -euo pipefail + BIN_PATH="target/${{ matrix.rust_target }}/release/${BINARY_NAME}" + + test -f "$BIN_PATH" + OUTDIR="$RUNNER_TEMP/pkg/${{ matrix.asset_name }}" mkdir -p "$OUTDIR" - install -m 0755 "target/${{ matrix.zig_target }}/release/${BINARY_NAME}" "$OUTDIR/${BINARY_NAME}" + install -m 0755 "$BIN_PATH" "$OUTDIR/${BINARY_NAME}" if [[ -f LICENSE ]]; then cp LICENSE "$OUTDIR/"; fi if [[ -f README.md ]]; then cp README.md "$OUTDIR/"; fi @@ -253,7 +249,6 @@ jobs: path: dist - name: Flatten artifacts - shell: bash run: | set -euo pipefail mkdir -p upload @@ -276,11 +271,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Buildx - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - name: Log in to GHCR if: ${{ needs.prepare.outputs.release_enabled == 'true' }} @@ -306,7 +298,6 @@ jobs: org.opencontainers.image.revision=${{ github.sha }} - name: Build and push - id: build uses: docker/build-push-action@v6 with: context: . @@ -337,7 +328,6 @@ jobs: path: release-artifacts - name: Flatten artifacts - shell: bash run: | set -euo pipefail mkdir -p upload