rmq-rpc 0.1.2

Client server for RPC via RabbitMQ
Documentation
name: release

on:
  release:
    types: [published]

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  test:
    runs-on: ubuntu-latest

    services:
      rabbitmq:
        image: rabbitmq:3-management
        ports:
          - 5672:5672

    steps:
    - uses: actions/checkout@v2

    - uses: actions-rs/toolchain@v1
      id: toolchain
      with:
        components: rustfmt, clippy
        override: true
        profile: minimal
        toolchain: stable

    - name: Check formatting
      uses: actions-rs/cargo@v1
      with:
        command: fmt
        args: --all -- --check

    - name: Lint
      uses: actions-rs/cargo@v1
      with:
        command: clippy
        args: --all -- -D warnings

    - name: Test
      uses: actions-rs/cargo@v1
      with:
        command: test
        args: --all --verbose

  publish:
    runs-on: ubuntu-latest

    needs: test

    steps:
    - uses: actions/checkout@v2

    - uses: actions-rs/toolchain@v1
      id: toolchain
      with:
        override: true
        profile: minimal
        toolchain: stable

    - name: Publish
      run: cargo publish
      env:
        CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}