File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ release :
3
+ types : [created, edited, published]
4
+ workflow_dispatch :
5
+ inputs :
6
+ dryRun :
7
+ description : " Dry run only"
8
+ required : true
9
+ default : true
10
+ type : boolean
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - uses : actions/setup-node@v3
18
+ with :
19
+ node-version : 20
20
+ registry-url : " https://registry.npmjs.org"
21
+ - run : npm ci
22
+
23
+ - name : Publish package
24
+ env :
25
+ NODE_AUTH_TOKEN : ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
26
+ if : >
27
+ (github.event_name == 'release' && github.event.action == 'published') ||
28
+ (github.event_name == 'workflow_dispatch' && !inputs.dryRun)
29
+ run : npm publish
30
+
31
+ - name : Publish package (dry run)
32
+ env :
33
+ NODE_AUTH_TOKEN : ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
34
+ if : >
35
+ (github.event_name == 'release' && github.event.action != 'published') ||
36
+ (github.event_name == 'workflow_dispatch' && inputs.dryRun)
37
+ run : npm publish --dry-run
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
3
branches :
4
- - master
5
4
- main
6
5
pull_request :
7
6
You can’t perform that action at this time.
0 commit comments