Skip to content

Commit e7cc225

Browse files
authored
Create generate-version.yml
1 parent c098a02 commit e7cc225

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate tag version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: New version
7+
required: true
8+
default: 'patch'
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
15+
jobs:
16+
version:
17+
name: Create new version ${{ github.event.inputs.version }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
ref: main
23+
- run: |
24+
git config user.name github-actions
25+
git config user.email github-actions@github.com
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: 20.x
30+
31+
- name: Generate new version
32+
run: npm version ${{ github.event.inputs.version }}
33+
34+
- name: Push new version tag to repository
35+
run: git push origin main --tags

0 commit comments

Comments
 (0)