Skip to content

Update lib.rs

Update lib.rs #1

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Install tools
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-all-features
- name: Release build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test-all-features
args: --verbose
- name: Check if can be packaged
uses: actions-rs/cargo@v1
with:
command: package
publish:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Publish to Crates.io
uses: actions-rs/cargo@v1
with:
command: publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}