Skip to content

Use new deku writer #812

Use new deku writer

Use new deku writer #812

Workflow file for this run

on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
env:
BINS: "add-backhand unsquashfs-backhand replace-backhand"
name: binaries
jobs:
# release binaries
release-bins:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C target-feature=+crt-static"
strategy:
matrix:
targets:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- arm-unknown-linux-musleabi
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Populate cache
uses: ./.github/workflows/cache
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
with:
toolchain: stable
target: ${{ matrix.targets }}
- run: cargo install cargo-quickinstall
- run: cargo quickinstall [email protected] --force
- run: cross build -p backhand-cli --bin add-backhand --bin replace-backhand --locked --target ${{ matrix.targets }} --profile=dist
# default features, but replace gzip with gzip-zune-inflate
- run: cross build -p backhand-cli --bin unsquashfs-backhand --locked --target ${{ matrix.targets }} --profile=dist --no-default-features --features zstd,xz,gzip-zune-inflate
- name: archive
run: |
tar -czvf backhand-${{ matrix.targets }}.tar.gz \
-C target/${{ matrix.targets }}/dist/ $BINS
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: backhand-${{ matrix.targets }}.tar.gz
path: backhand-${{ matrix.targets }}.tar.gz
# check semvar before release!
- name: Check semver
env:
# disable static build for this job
RUSTFLAGS: ""
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: obi1kenobi/cargo-semver-checks-action@48f4ef7da6d907d69d18249e0ba79aa98c61b9db # v2.3
with:
package: backhand
- name: Upload binary to release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backhand-${{ matrix.targets }}.tar.gz
asset_name: backhand-${{ github.ref_name }}-${{ matrix.targets }}.tar.gz
tag: ${{ github.ref }}
prerelease: true
overwrite: true