File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Publish to npm
1
+ name : publish
2
+ run-name : Publishing ${{ github.event.inputs.release_type || 'stable' }} release
2
3
3
4
on :
4
5
workflow_dispatch :
6
+ inputs :
7
+ release-type :
8
+ description : ' Release type'
9
+ required : true
10
+ default : ' stable'
11
+ type : choice
12
+ options :
13
+ - stable
14
+ - alpha
15
+ - beta
5
16
6
17
permissions :
7
18
id-token : write
46
57
- name : Semantic Release
47
58
run : |
48
59
npm whoami
49
- npx semantic-release
60
+ if [ "${{ github.event.inputs.release-type }}" != "stable" ]; then
61
+ npx semantic-release --tag ${{ github.event.inputs.release-type }}
62
+ else
63
+ npx semantic-release
64
+ fi
50
65
env :
51
66
GITHUB_TOKEN : ${{ secrets.PRIVATE_GITHUB_TOKEN }}
52
67
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
1
{
2
2
"branches": [
3
- "main"
3
+ "main",
4
+ {
5
+ "name": "beta",
6
+ "prerelease": true
7
+ },
8
+ {
9
+ "name": "alpha",
10
+ "prerelease": true
11
+ }
4
12
]
5
13
}
You can’t perform that action at this time.
0 commit comments