-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 1.05 KB
/
release.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
36
37
38
39
40
41
42
43
name: 'release'
on:
workflow_dispatch:
inputs:
bump:
description: 'Semver version to bump'
required: true
type: choice
options:
- patch
- minor
- major
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- id: bump
run: |
VERSION=$(npm version ${{ github.event.inputs.bump }} --no-git-tag-version)
echo ::set-output name=version::$VERSION
- uses: EndBug/add-and-commit@v9
with:
add: 'package.json package-lock.json'
default_author: github_actor
message: 'chore: bump to ${{ steps.bump.outputs.version }}'
push: 'origin main --set-upstream --force'
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}