safe-nd 0.10.4

Safe Network Data Types
Documentation
name: Version bump, create PR and tag when merged

on:
  # Trigger the workflow on push only for the master branch
  push:
    branches:
      - master

env:
  NODE_ENV: 'development'

jobs:
  update_changelog:
    runs-on: ubuntu-latest
    # Dont run if we're on a release commit
    if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: '0'
      - name: Bump Version
        uses: maidsafe/rust-version-bump-branch-creator@v2
        with:
          token: ${{ secrets.BRANCH_CREATOR_TOKEN }}

  tag:
      runs-on: ubuntu-latest
      # Only run on a release commit
      if: "startsWith(github.event.head_commit.message, 'chore(release):')"
      steps:
        - uses: actions/checkout@v2
          with:
            fetch-depth: '0'
        - run: echo ::set-env name=RELEASE_VERSION::$(git log -1 --pretty=%B)
        # parse out non-tag text
        - run: echo ::set-env name=RELEASE_VERSION::$( echo $RELEASE_VERSION | sed 's/chore(release)://' )
        #remove spaces
        - run: echo ::set-env name=RELEASE_VERSION::$(echo $RELEASE_VERSION | tr -d '[:space:]')
        - run: echo $RELEASE_VERSION
        - run: git tag $RELEASE_VERSION && git push --tags