Skip to content

Merge pull request #496 from Chia-Network/dependabot/cargo/pyo3-0.22.6 #967

Merge pull request #496 from Chia-Network/dependabot/cargo/pyo3-0.22.6

Merge pull request #496 from Chia-Network/dependabot/cargo/pyo3-0.22.6 #967

Workflow file for this run

name: Build rust crate
on:
push:
branches:
- main
- dev
tags:
- "**"
pull_request:
branches:
- "**"
jobs:
build_crate:
name: Crate
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up rusts
uses: dtolnay/rust-toolchain@stable
- name: fmt (stable)
run: cargo +stable fmt -- --files-with-diff --check
- name: clippy (stable)
run: cargo +stable clippy
- name: tests
run: cargo test && cargo test --release
- name: build
run: cargo build --release
- name: dry-run of `cargo publish`
run: cargo publish --dry-run
- name: publish to crates.io if tagged
if: startsWith(github.event.ref, 'refs/tags')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.cargo_registry_token }}
run: cargo publish