chore(deps): update codecov/codecov-action action to v5 #1361
Workflow file for this run
This file contains 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
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: ${{ matrix.job.os }} | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
BUILD_CMD: cargo | |
strategy: | |
fail-fast: false | |
matrix: | |
job: | |
- { target: x86_64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true } | |
- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true } | |
- { target: arm-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true } | |
- { target: armv7-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true } | |
- { target: x86_64-apple-darwin, os: macos-14 } | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Populate cache | |
uses: ./.github/workflows/cache | |
- name: Overwrite build command env variable | |
if: matrix.job.use-cross | |
shell: bash | |
run: | | |
echo "BUILD_CMD=cross" >> $GITHUB_ENV | |
RUSTFLAGS="-C target-feature=-crt-static" cargo install cross --git https://github.com/cross-rs/cross | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
target: ${{ matrix.job.target }} | |
- run: $BUILD_CMD build -p backhand-cli --bin add-backhand --bin replace-backhand --features xz-static --locked --target ${{ matrix.job.target }} --profile=dist | |
- run: $BUILD_CMD build -p backhand-cli --bin unsquashfs-backhand --locked --target ${{ matrix.job.target }} --profile=dist --no-default-features --features zstd,xz-static,gzip | |
- name: archive | |
run: | | |
tar -czvf backhand-${{ matrix.job.target }}.tar.gz \ | |
-C target/${{ matrix.job.target }}/dist/ $BINS | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: backhand-${{ matrix.job.target }}.tar.gz | |
path: backhand-${{ matrix.job.target }}.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@c7306483f698c511eaf7416d1bf2e1958c90140f # v2.4 | |
with: | |
package: backhand | |
feature-group: default-features | |
- name: Upload binary to release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: backhand-${{ matrix.job.target }}.tar.gz | |
asset_name: backhand-${{ github.ref_name }}-${{ matrix.job.target }}.tar.gz | |
tag: ${{ github.ref }} | |
prerelease: true | |
overwrite: true |