Skip to content

Commit 5712407

Browse files
chore: Support alpha and beta release (#97)
1 parent d875790 commit 5712407

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
name: Publish to npm
22

3+
run-name: Publish to npm - ${{ inputs.release-type }}
4+
35
on:
46
workflow_dispatch:
7+
inputs:
8+
release-type:
9+
description: 'Release type'
10+
required: true
11+
default: 'alpha'
12+
type: choice
13+
options:
14+
- alpha
15+
- beta
16+
- stable
517

618
permissions:
719
id-token: write
@@ -46,7 +58,11 @@ jobs:
4658
- name: Semantic Release
4759
run: |
4860
npm whoami
49-
npx semantic-release
61+
if [ "${{ github.event.inputs.release-type }}" != "stable" ]; then
62+
npx semantic-release --tag ${{ github.event.inputs.release-type }}
63+
else
64+
npx semantic-release
65+
fi
5066
env:
5167
GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
5268
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"branches": [
3-
"main"
3+
"main",
4+
{
5+
"name": "beta",
6+
"prerelease": true
7+
},
8+
{
9+
"name": "alpha",
10+
"prerelease": true
11+
}
412
]
513
}

0 commit comments

Comments
 (0)