-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
37 lines (33 loc) · 952 Bytes
/
action.yaml
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
name: 'npm Version and Publish'
author: Bitovi
description: 'Version and publish your npm package'
branding:
icon: tag
color: red
inputs:
update_type:
description: "The version segment to increment: major, minor, or patch."
required: true
default: 'patch'
publish:
description: "Publish the package"
required: false
default: 'true'
npm_token:
description: "npm Secrets token"
required: true
runs:
using: "composite"
steps:
- id: Tag-push
shell: bash
run: |
git config user.name github-actions
git config user.email [email protected]
npm version ${{ github.event.inputs.update_type }} -m "Publish v%s"
# git push --tags
- name: Publish to NPM Registry
if: ${{ github.event.inputs.publish == 'true' }}
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ github.event.inputs.npm_token }}