name: Release
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on: workflow_dispatch
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint
run: cargo clippy -- -A clippy::needless_return
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Cargo publish
if: github.ref == 'refs/heads/main'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p bitgrep