yara 0.32.0

Rust bindings for VirusTotal/yara
name: release

on:
  push:
    tags:
    - 'v*'
    inputs:
      dry_run:
        description: "Dry run the workflow?"
        required: true
        default: false

  workflow_dispatch:
    inputs:
      dry_run:
        description: "Dry run the workflow?"
        required: true
        default: true
      tag:
        description: "Tag to use for the release"
        required: true

jobs:
  release:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - uses: katyo/publish-crates@v1
        with:
          args: "--features bundled-4_5_5"
          dry-run: ${{ github.event.inputs.dry_run }}
          registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# TODO Make it grab the changelog from CHANGELOG.md
#      - uses: ncipollo/release-action@v1
#        with:
#          token: ${{ secrets.GITHUB_TOKEN }}