actions/git/tag/action.yaml

13 lines
345 B
YAML
Raw Normal View History

2023-08-06 20:53:44 -04:00
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"