ybaas 0.0.19

Don't you love when you accidentally tap your Yubikey when you have your IRC client in focus and you send 987947 into Libera? Want to be able to have that experience without having to reach all the way over to your laptop's USB port? Don't want the complexity of installing and using the yubibomb CLI tool? Now you can use yubibomb as a service!
---
name: Release

on:
  push:
    tags:
      - "*"

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      # See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
      - name: Set RELEASE_VERSION
        run: echo "YBAAS_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Build and push to DockerHub
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          file: Containerfile
          push: true
          tags: "bowlofeggs/ybaas:latest,bowlofeggs/ybaas:${{ env.YBAAS_VERSION }}"
      - name: Check out the code
        uses: actions/checkout@v2
      - name: Run build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release
      - name: Run cargo doc
        uses: actions-rs/cargo@v1
        with:
          command: doc
          args: --no-deps
      - name: Compress rustdoc output
        run: |
          tar cvjf target/rust_docs.tar.bz2 target/doc
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: ${{ github.ref }}
          draft: false
          prerelease: false
      - name: Upload build
        id: upload_build
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./target/release/ybaas
          asset_name: ybaas-x86_64-unknown-linux-gnu
          asset_content_type: application/octet-stream
      - name: Upload Rust docs
        id: upload_rust_docs
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./target/rust_docs.tar.bz2
          asset_name: docs.tar.bz2
          asset_content_type: application/octet-stream
      - name: Upload CHANGELOG.md
        id: upload_changelog
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: CHANGELOG.md
          asset_name: CHANGELOG.md
          asset_content_type: text/markdown
      - name: Upload README.md
        id: upload_readme
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: README.md
          asset_name: README.md
          asset_content_type: text/markdown
      - name: Publish to crates.io
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        uses: actions-rs/cargo@v1
        with:
          command: publish