-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (41 loc) · 1.14 KB
/
version-bump-publish.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
name: version-bump-publish
on:
workflow_dispatch:
inputs:
level:
description: '<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease'
required: true
default: 'patch'
tag:
description: 'The tag to publish to.'
required: false
default: 'latest'
dryRun:
description: 'Test with --dry-run'
type: boolean
default: true
jobs:
checkout:
name: checkout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git config user.name github-actions
git config user.email [email protected]
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
npm ci
npm test
- name: bump and pub
if: ${{ github.event.inputs.level != '' }}
run: |
npm version ${{ github.event.inputs.level }}
git push
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
dry-run: ${{ github.event.inputs.dryRun }}
tag: ${{ github.event.inputs.tag }}