name: release
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
type: string
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build release artifact
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, macos-m1, windows]
include:
- build: linux
os: ubuntu-latest
os_label: ubuntu
cpu: x86_64
rust: stable
binary: dply
- build: macos-m1
os: macos-14
os_label: macos
cpu: m1
rust: stable
binary: dply
- build: windows
os: windows-latest
os_label: windows
cpu: x86_64
rust: stable
binary: dply.exe
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Run build
run: cargo build --release
- name: Run tests
run: cargo test --release
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dply-${{ inputs.version }}-${{ matrix.cpu }}-${{ matrix.os_label }}
path: |
target/release/${{ matrix.binary }}