Skip to content

Commit 81c1c2f

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

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ name: Publish to npm
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
release-type:
7+
description: 'Release type'
8+
required: true
9+
default: 'alpha'
10+
type: choice
11+
options:
12+
- alpha
13+
- beta
14+
- stable
515

616
permissions:
717
id-token: write
@@ -46,7 +56,11 @@ jobs:
4656
- name: Semantic Release
4757
run: |
4858
npm whoami
49-
npx semantic-release
59+
if [ "${{ github.event.inputs.release-type }}" != "stable" ]; then
60+
npx semantic-release --tag ${{ github.event.inputs.release-type }}
61+
else
62+
npx semantic-release
63+
fi
5064
env:
5165
GITHUB_TOKEN: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
5266
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)