Add action to automatically tag commits

Using this action: https://github.com/marketplace/actions/github-tag-bump
The idea is that the repo will be versioned in SemVer format, such as "v0.5.3".
When a PR is merged, a new version will automatically be added.
The new version is generated based on the latest tag, and the part that is bumped
is dictated by the merge commit message, either #major, #minor (default) or #patch.

This way I (the repo owner) has control over versioning, and other contributors
don't have to bother with anything.
This commit is contained in:
P0nk
2022-10-16 08:34:45 +02:00
parent 70b82e0b66
commit 5c7fcdae06

23
.github/workflows/bump-version.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Bump version
on:
pull_request:
#types:
# - closed
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true