ci: autotag on merge; readme workflow (#19) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |