Skip to content

pre-releases

pre-releases #18

Workflow file for this run

---
name: "pre-releases"
on:
push:
tags: 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
publish-rc:
name: "Tagged pre-release"
runs-on: "ubuntu-latest"
needs:
- fmt
- clippy
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- name: "Prebuild"
run: |
sudo apt-get update
sudo apt-get install -y libsndfile1-dev
- uses: olegtarasov/[email protected]
id: tagName
- name: "Build & tests"
run: |
cargo test --release --verbose
cargo build --release --verbose
cp target/release/audeye "audeye-${GIT_TAG_NAME}-linux-amd64"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
title: "${{ steps.tagName.outputs.tag }}"
files: |
LICENSE
audeye-${{ steps.tagName.outputs.tag }}-linux-amd64