-
-
Notifications
You must be signed in to change notification settings - Fork 452
36 lines (34 loc) · 905 Bytes
/
bump-version.yml
File metadata and controls
36 lines (34 loc) · 905 Bytes
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
31
32
33
34
35
36
name: bump-version
on:
workflow_dispatch:
inputs:
type:
type: choice
description: Type of version bump
required: true
options:
- patch
- minor
- major
jobs:
bump:
name: Bump to a new version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Configure user
run: |
git config --local user.name "${{ github.actor }}"
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
- name: Bump the version
run: npm version ${{ github.event.inputs.type }}
- name: Push commit
run: git push origin master:master
- name: Push tag
run: git push origin --tags