name: Build Artifacts
on:
push:
branches: [ "master" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build - ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: rdupes
- os: macos-latest
target: x86_64-apple-darwin
binary_name: rdupes
- os: macos-latest
target: aarch64-apple-darwin
binary_name: rdupes
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: rdupes.exe
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: rdupes-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.binary_name }}
if-no-files-found: error