diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..666a6ef --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,17 @@ +name: Publish crates + +on: + push: + tags: [ v* ] + +env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + +jobs: + publish-crate: + name: Publish to crates.io + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run cargo publish + run: cargo publish diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..f318a9f --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,35 @@ +name: Rust build checks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + fmt: + name: Check code formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run cargo fmt + run: cargo fmt -- --check + clippy: + name: Clippy lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run cargo clippy + run: cargo clippy --tests -- --deny warnings