-
Notifications
You must be signed in to change notification settings - Fork 64
40 lines (34 loc) · 1.04 KB
/
release-it.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
name: Release a new version
on:
workflow_dispatch:
inputs:
version:
description: 'Version to increment'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
- preminor
- premajor
- prepatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Release a new version
env:
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }}
run: |
npm install -g release-it
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-action"
release-it --increment=${{ github.event.inputs.version }} --ci --github.release --github.draft --git.commitMessage="chore: release v\${version}" --git.tagName="v\${version}"