Skip to content

ci: autotag on merge; readme workflow (#19) #1

ci: autotag on merge; readme workflow (#19)

ci: autotag on merge; readme workflow (#19) #1

Workflow file for this run

name: Auto Tag on Merge
on:
push:
branches:
- master
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --local user.email "s-kozelsk@yandex.ru"
git config --local user.name "Gornak40 (autotag)"
- name: Get latest commit message
run: |
echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
- name: Run semver script
run: |
chmod +x ./scripts/semver.sh
echo "VERSION=$(./scripts/semver.sh)" >> $GITHUB_ENV
- name: Tag commit
run: |
git tag -a "$VERSION" -m "$COMMIT_MESSAGE"
git push origin "$VERSION"