-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (29 loc) · 1.08 KB
/
autotag.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Create Tag
on:
push:
branches:
- main
jobs:
build:
if: |
github.event.pusher.name == github.event.repository.owner.name
&& startsWith(github.event.head_commit.message, 'Release')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Tag
id: tagger-action
uses: christophebedard/tag-version-commit@v1
with:
token: ${{ secrets.GB_TOKEN }}
version_regex: 'Release v?((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?:[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)'
version_tag_prefix: 'v'
check_entire_commit_message: true
version_assertion_command: 'grep -q "\"version\": \"$version\"" package.json'
- name: Tag Empty output
if: ${{ steps.tagger-action.outputs.tag == '' }}
run: echo 'The not created.'
- name: Tag Created output
if: ${{ steps.tagger-action.outputs.tag != '' }}
run: echo "Tag created ${{ steps.tagger-action.outputs.tag }}"