Skip to content

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

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

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

name: Tag and Release
on:
push:
branches:
- main
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
- name: Print Git Config
run: git config --list
- name: Print Environment Variables
run: printenv
- name: Bump version and push tag
id: bump_version
env:
DEFAULT_BUMP: minor
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
echo "Token length: ${#GITHUB_TOKEN}"
./bump_version.sh
- name: Create Release
if: success()
uses: actions/create-release@v1
with:
tag_name: ${{ steps.bump_version.outputs.NEW_VERSION }}
release_name: Release ${{ steps.bump_version.outputs.NEW_VERSION }}
body: |
See [CHANGELOG](https://github.com/tawanda-kembo/code-collator/blob/main/CHANGELOG.md) for details.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}