File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# https://help..com/en/categories/automating-your-workflow-with--actions
2+
3+
name: "Create tag"
4+
5+
on:
6+
# https://docs..com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dis
7+
workflow_dis:
8+
inputs:
9+
version:
10+
description: 'Next version'
11+
required: true
12+
default: ''
13+
type: choice
14+
options:
15+
-
16+
- minor
17+
18+
jobs:
19+
create-tag:
20+
name: "Create tag"
21+
runs-on: "ubuntu-latest"
22+
steps:
23+
- name: "Checkout"
24+
uses: actions/checkout@v3
25+
with:
26+
fetch-depth: 0
27+
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}
28+
29+
- name: 'Get Previous tag'
30+
id: previoustag
31+
uses: "WyriHaximus/-action-get-previous-tag@v1"
32+
env:
33+
_TOKEN: "${{ secrets._TOKEN }}"
34+
35+
- name: 'Get next versions'
36+
id: semvers
37+
uses: "WyriHaximus/-action-next-semvers@v1"
38+
with:
39+
version: ${{ steps.previoustag.outputs.tag }}
40+
41+
- name: "Create new minor tag"
42+
uses: rickstaa/action-create-tag@v1
43+
if: inputs.version == 'minor'
44+
with:
45+
tag: ${{ steps.semvers.outputs.minor }}
46+
message: ${{ steps.semvers.outputs.minor }}
47+
48+
- name: "Create new tag"
49+
uses: rickstaa/action-create-tag@v1
50+
if: inputs.version == ''
51+
with:
52+
tag: ${{ steps.semvers.outputs. }}
53+
message: ${{ steps.semvers.outputs. }}

0 commit comments

Comments
 (0)