From 35af973653f288215ee03c7cfdd0ca4020e8ce72 Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Mon, 7 Aug 2023 00:53:44 +0000 Subject: [PATCH] Add git/tag/action.yaml --- git/tag/action.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 git/tag/action.yaml 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"