diff --git a/git/tag/action.yaml b/git/tag/action.yaml new file mode 100644 index 0000000..2c6ceb6 --- /dev/null +++ b/git/tag/action.yaml @@ -0,0 +1,12 @@ +name: Git Tag +desciption: Tag commit with version number + +runs: + using: composite + container: alpine/git + steps: + - run: | + $TAG=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+') + [ -z "$TAG" ] && TAG=$(git describe) + git tag -f "$TAG" "$GITHUB_SHA" + git push -f origin "$TAG"