redlock-async 0.0.3

Implementation of the distributed locking mechanism built on top of Async Redis
Documentation
name: Release

on:
  workflow_dispatch:
    inputs:
      release:
        description: 'Release level or valid semver'
        required: true
        default: 'release'
      execute:
        description: 'Whether to actually execute release'
        required: true
        default: 'false'
      token:
        description: 'Crates.io token'
        required: false

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          # Fetches entire history, so we can analyze commits since last tag
          fetch-depth: 0
      - uses: actions-rs/toolchain@v1.0.7
        with:
          toolchain: stable
          override: true
      - uses: fusion-engineering/setup-git-credentials@v2
        with:
          credentials: ${{ secrets.GITHUB_TOKEN }}
      - uses: Swatinem/rust-cache@v1
      - name: Install cargo-release
        run: cargo install cargo-release
      - name: Setup git config
        run: |
          git config user.name "GitHub Actions Bot"
          git config user.email "<>"
      # WARNING: Clean up the job after using release action - due to a limitation in github actions the token cannot
      #          be masked when coming from a workflow_dispatch input. It will be logged in plaintext.
      - name: Release
        if: ${{ github.event.inputs.execute  == 'true' }}
        run: cargo release -v -x --no-confirm --token ${{ github.event.inputs.token }} ${{ github.event.inputs.release }}
      - name: Release (Dry Run)
        if: ${{ github.event.inputs.execute  != 'true' }}
        run: cargo release -v ${{ github.event.inputs.release }}