-
-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (50 loc) · 1.27 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (50 loc) · 1.27 KB
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
name: npm bump
on:
workflow_dispatch:
inputs:
version-type:
description: 'Version type'
type: choice
options:
- patch
- minor
- major
- custom
default: 'patch'
required: true
new-version:
description: 'Custom version (only used when version-type is "custom")'
required: false
env:
FORCE_COLOR: 3
permissions:
contents: write
id-token: write
concurrency:
group: npm-bump
cancel-in-progress: true
jobs:
version_and_release:
runs-on: ubuntu-latest
outputs:
tagName: ${{ steps.npm-bump.outputs.release-tag }}
steps:
- uses: actions/checkout@v7
with:
# fetch full history so things like auto-changelog work properly
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: package.json
check-latest: true
- run: npm i
- run: npm test
- run: git reset --hard && git clean -fd
- name: Version and publish to npm
id: npm-bump
uses: bcomnes/npm-bump@v3
with:
version-type: ${{ github.event.inputs['version-type'] }}
new-version: ${{ github.event.inputs['new-version'] }}
github-token: ${{ secrets.GITHUB_TOKEN }}