Skip to content

version 0.1

version 0.1 #1

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
tags: [ "release/v*" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
no_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --no-default-features
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
uses: giraffate/clippy-action@v1
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Cargo check
run: cargo check
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release/v')
needs: [build, no_features, test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Authenticate
run: cargo login ${{ secrets.CARGO_PUBLISH_TOKEN }}
- name: Publish
run: cargo publish