plotlib 0.5.1

Pure Rust plotting library
Documentation
name: Rust

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
          - nightly
    steps:
      - uses: actions/checkout@v2
      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          override: true
          profile: minimal
      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --verbose
      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --verbose
  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
          profile: minimal
      - name: Run cargo-tarpaulin
        uses: actions-rs/tarpaulin@v0.1
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
  release:
    runs-on: ubuntu-latest
    needs: build
    if: startsWith(github.ref, 'refs/tags/')
    steps:
      - uses: actions/checkout@v1
      - name: Get the changelog
        id: get_changes
        run: |
          changelog=$(sed '/^## '"${GITHUB_REF#refs/tags/}"'.*/,/^## .*/!d;//d' CHANGELOG)
          changelog="${changelog//'%'/'%25'}"
          changelog="${changelog//$'\n'/'%0A'}"
          changelog="${changelog//$'\r'/'%0D'}"
          echo "::set-output name=changelog::${changelog}"
      - name: Create Release
        id: create_release
        uses: actions/create-release@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: ${{ github.ref }}
          body: "${{ steps.get_changes.outputs.changelog }}"
          draft: false
          prerelease: true
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
          profile: minimal
      - name: Publish
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --verbose
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}