Skip to content

Bugfixes (#4)

Bugfixes (#4) #7

Workflow file for this run

name: Autotag
on:
push:
branches:
- master
jobs:
createTag:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
outputs:
name: ${{ steps.version.outputs.name }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get tags
run: git fetch --tags origin
- name: Set new tag
id: version
run: |
LAST_TAGGED_COMMIT=$(git rev-list --tags --max-count=1)
TAG=$(git describe --tags $LAST_TAGGED_COMMIT)
TAG=${TAG%.*}.$((${TAG##*.} + 1))
if git describe --exact-match HEAD; then
echo "name=NO" >> $GITHUB_OUTPUT
else
echo "name=$TAG" >> $GITHUB_OUTPUT
fi
pushTag:
needs: createTag
runs-on: ubuntu-latest
if: ${{ needs.createTag.outputs.name != 'NO' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Tag current commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag -a ${{ needs.createTag.outputs.name }} -m "Auto-tagging the current commit"
git push --tags