Skip to content

Merge pull request #106 from kloia/adjust-aws-sso-values #180

Merge pull request #106 from kloia/adjust-aws-sso-values

Merge pull request #106 from kloia/adjust-aws-sso-values #180

name: Semantic Versioning Tagging
on:
push:
branches:
- main
jobs:
create_tag:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'Bump version')"
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_PAT }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install bump2version
run: pip install bump2version
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Bump version and tag
run: |
CURRENT_VERSION=$(bump2version --dry-run --list patch | grep current_version | sed -r s,"^.*=",,)
echo "Current version: $CURRENT_VERSION"
NEW_VERSION=$(bump2version --dry-run --list patch | grep new_version | sed -r s,"^.*=",,)
echo "New version: $NEW_VERSION"
bump2version patch
git push
git push --tags