simple-storage 0.0.2

Super simple key-value storage.
Documentation
name: Publish Crate

on:
  workflow_dispatch:
    inputs:
      version:
        required: false
        description: Version to publish
        

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Update Version
      if: github.event.inputs.version
      run: |
        git config user.name CI
        git config user.email CI@user.github.com
        
        branch="$( git branch | grep '*' | sed 's/*//g' )"
        new_version="${{ github.event.inputs.version }}"
        old_version=$(cat Cargo.toml | grep "^version =" | awk -F"=" '{print $2}')
        
        (cat Cargo.toml | sed "s/^version = \".*\"/version = \"${new_version}\"/g") > Cargo.toml
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
    - name: Push config
      run: |
        git add -A .
        git commit -m "${new_version}"
        git push -u origin $branch
    - name: Publish
      run: cargo publish ${{ secrets.CARGO_TOKEN }}