Skip to content

Merge pull request #1 from tawanda-kembo/feat/automate-versioning #1

Merge pull request #1 from tawanda-kembo/feat/automate-versioning

Merge pull request #1 from tawanda-kembo/feat/automate-versioning #1

name: Tag and Release
on:
push:
branches:
- main
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
release_branches: main
custom_tag: |
if [[ ${{ github.event.head_commit.message }} =~ ^(feat|fix|perf|refactor|BREAKING CHANGE|build|ci|chore|docs|style|test): ]]; then
echo "::set-output name=custom_tag::${{ steps.tag.outputs.tag_name }}"
fi
- name: Create Release
if: steps.tag.outputs.tag_name != ''
uses: actions/create-release@v1
with:
tag_name: ${{ steps.tag.outputs.tag_name }}
release_name: Release ${{ steps.tag.outputs.tag_name }}
body: |
See [CHANGELOG](https://github.com/tawanda-kembo/code-collator/blob/main/CHANGELOG.md) for details.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}