Skip to content

Commit 1039e07

Browse files
committed
ci: adjust publish workflow
1 parent c4ba327 commit 1039e07

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/publish.yml

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
name: Publish
22

33
on:
4-
push:
5-
tags:
6-
- v*.*.*
4+
workflow_dispatch:
5+
inputs:
6+
publishTag:
7+
description: "npm publish --tag <tag>"
8+
required: true
9+
default: "latest"
10+
type: choice
11+
options:
12+
- latest
13+
- next
14+
- test
15+
bump:
16+
description: "Changelogen bump flag"
17+
required: true
18+
default: "--bump"
19+
type: choice
20+
options:
21+
- --bump
22+
- --prerelease
23+
- --canary
724

825
permissions:
926
id-token: write
@@ -27,11 +44,11 @@ jobs:
2744
- name: Install Packages
2845
run: yarn install
2946

30-
- name: Build
31-
run: yarn build
47+
- name: Bump Version
48+
run: yarn changelogen --release --push ${{ github.event.inputs.bump }}
3249

3350
- name: Publish to NPM
34-
run: npm publish --provenance
51+
run: npm publish --provenance --tag ${{ github.event.inputs.publishTag }}
3552
env:
3653
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3754
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)