name: Version bump, create PR and tag when merged
on:
push:
branches:
- master
env:
NODE_ENV: 'development'
jobs:
update_changelog:
runs-on: ubuntu-latest
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
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)
- run: echo ::set-env name=RELEASE_VERSION::$( echo $RELEASE_VERSION | sed 's/chore(release)://' )
- 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