Skip to content

addinig something to readme #122

addinig something to readme

addinig something to readme #122

Workflow file for this run

name: Rust
on:
push:
branches: [main]
tags:
- 'v*' # Ensures the workflow also triggers on tag pushes that start with 'v'
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Check Formatting
run: cargo fmt -- --check
- name: Security audit
run: |
cargo audit
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Lint with Clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings
publish:
needs: build
runs-on: ubuntu-latest
# This job only runs if the GitHub event that triggered the workflow is a push to a tag starting with 'v'
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Publish to crates.io
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CRATESTOKEN }}