Skip to content

Cleanup. CI

Cleanup. CI #2

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
tags:
- v*
- pre-rel-*
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
steps:
- name: Check lockfile
uses: actions-rs/cargo@v1
with:
command: tree
args: --locked
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Check clippy lints
uses: actions-rs/cargo@v1
with:
command: Clippy
args: --all-targets --all-features --workspace -- -D warnings
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- name: Build Release
if: startsWith(github.ref, 'refs/tags/')
run: cargo build --release
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: target/release/*.exe
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-rel-v') }}