Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 105f5c1

Browse files
Create tag workflow
1 parent bb7a517 commit 105f5c1

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

‎.github/workflows/create-tag.yml‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Create tag"
4+
5+
on:
6+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Next version'
11+
required: true
12+
default: 'patch'
13+
type: choice
14+
options:
15+
- patch
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/github-action-get-previous-tag@v1"
32+
env:
33+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
34+
35+
- name: 'Get next versions'
36+
id: semvers
37+
uses: "WyriHaximus/github-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 patch tag"
49+
uses: rickstaa/action-create-tag@v1
50+
if: inputs.version == 'patch'
51+
with:
52+
tag: ${{ steps.semvers.outputs.patch }}
53+
message: ${{ steps.semvers.outputs.patch }}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /