Skip to content

feat(lib): wait for user #4

feat(lib): wait for user

feat(lib): wait for user #4

Workflow file for this run

name: Rust
on:
push:
branches: [main]
tags: 'v*'
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
# Fail on all warnings.
RUSTFLAGS: '-Dwarnings'
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Toolchain versions
run: |
rustc --version
cargo --version
- name: Build
run: cargo build --release --all-targets --all-features --verbose
- name: Clippy
run: cargo clippy --release --all-targets --all-features --verbose
- name: Test
run: cargo test --release --all-targets --all-features
# Create release only for tag commit.
## General
- name: General release artifacts
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.os == 'ubuntu-latest' }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: collection.toml
## Ubuntu
- name: Prepare Ubuntu release
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.os == 'ubuntu-latest' }}
run: strip target/release/collection
- name: Create Ubuntu release
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.os == 'ubuntu-latest' }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/release/collection
## Windows
- name: Create Windows release
if: ${{ startsWith(github.ref, 'refs/tags') && matrix.os == 'windows-latest' }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/release/collection.exe