-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (53 loc) · 1.47 KB
/
manual_bump_version.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Bump version
on:
workflow_dispatch:
inputs:
semver:
description: 'Semver bump'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
name: Bump package ${{ inputs.semver }} version
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Set up NASM (for imagemin binary builds)
uses: ilammy/setup-nasm@v1
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: Set Git user
run: |
git config --global user.name 'vHeemstra'
git config --global user.email '[email protected]'
- run: npm ci
- name: Major version
if: ${{ inputs.semver == 'major' }}
run: npm run bump:major
- name: Minor version
if: ${{ inputs.semver == 'minor' }}
run: npm run bump:minor
- name: Patch version
if: ${{ inputs.semver == 'patch' }}
run: npm run bump:patch
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs