File tree Expand file tree Collapse file tree 6 files changed +215
-22
lines changed Expand file tree Collapse file tree 6 files changed +215
-22
lines changed Original file line number Diff line number Diff line change 6
6
LEFTHOOK : 0
7
7
8
8
jobs :
9
- build :
10
-
9
+ verify :
11
10
runs-on : ubuntu-latest
12
11
13
- strategy :
14
- matrix :
15
- node-version : [ 18.x ]
16
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17
-
18
12
steps :
19
13
- uses : actions/checkout@v2
20
-
21
14
- name : Cache multiple paths
22
15
uses : actions/cache@v2
23
16
with :
@@ -39,19 +32,26 @@ jobs:
39
32
${{ runner.os }}-yarn-
40
33
41
34
- name : Use Node.js ${{ matrix.node-version }}
42
- uses : actions/setup-node@v2
35
+ uses : actions/setup-node@v3
43
36
with :
44
- node-version : ${{ matrix.node-version }}
37
+ node-version : 18
45
38
cache : ' yarn'
46
39
47
40
- run : yarn --pure-lockfile
48
- - run : yarn lint
41
+ - run : yarn ci
42
+ - run : npx semantic-release --dry-run
43
+ id : get-next-version
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ outputs :
47
+ new-release-published : ${{ steps.get-next-version.outputs.new-release-published }}
48
+ new-release-version : ${{ steps.get-next-version.outputs.new-release-version }}
49
49
50
50
release :
51
- needs : [build]
51
+ needs : [verify]
52
+ if : needs.verify.outputs.new-release-published == 'true'
52
53
name : Release
53
54
runs-on : ubuntu-latest
54
- if : ${{github.ref == 'ref/head/main'}} || ${{github.ref == 'ref/head/next'}}
55
55
steps :
56
56
- name : Checkout
57
57
uses : actions/checkout@v2
@@ -79,14 +79,15 @@ jobs:
79
79
${{ runner.os }}-yarn-
80
80
81
81
- name : Use Node.js ${{ matrix.node-version }}
82
- uses : actions/setup-node@v2
82
+ uses : actions/setup-node@v3
83
83
with :
84
- node-version : ${{ matrix.node-version }}
84
+ node-version : 18
85
85
cache : ' yarn'
86
86
87
87
- name : Install deps
88
88
run : yarn --pure-lockfile --offline
89
-
89
+ - name : Build
90
+ run : yarn build
90
91
- name : Release
91
92
env :
92
93
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 14
14
],
15
15
"plugins" : [
16
16
" @semantic-release/commit-analyzer" ,
17
+ " semantic-release-export-data" ,
17
18
" @semantic-release/release-notes-generator" ,
18
19
[
19
20
" @semantic-release/changelog" ,
22
23
"changelogFile" : " CHANGELOG.md"
23
24
}
24
25
],
25
- " @semantic-release/npm" ,
26
+ [
27
+ " @semantic-release/npm" ,
28
+ {
29
+ "postversion" : " yarn build"
30
+ }
31
+ ],
26
32
" @semantic-release/github" ,
27
33
[
28
34
" @semantic-release/git" ,
Original file line number Diff line number Diff line change 36
36
"release" : " semantic-release"
37
37
},
38
38
"dependencies" : {
39
+ "@types/inquirer" : " ^9.0.1" ,
39
40
"@types/node" : " ^18.0.0" ,
40
- "core-js" : " ^3.19.1" ,
41
41
"chalk" : " ^5.0.1" ,
42
- "commander" : " ^9.3.0"
42
+ "commander" : " ^9.3.0" ,
43
+ "core-js" : " ^3.19.1" ,
44
+ "inquirer" : " ^9.1.0"
43
45
},
44
46
"commitlint" : {
45
47
"extends" : [
76
78
"npm-run-all" : " ^4.1.5" ,
77
79
"rimraf" : " ^3.0.2" ,
78
80
"semantic-release" : " ^19.0.3" ,
81
+ "semantic-release-export-data" : " ^1.0.0" ,
79
82
"ts-node" : " ^10.8.1" ,
80
83
"typescript" : " ^4.4.4" ,
81
84
"uuid" : " ^8.3.2" ,
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from 'commander' ;
4
+ import { version } from '../package.json' ;
5
+
6
+ const APP_NAME = 'Meza\'s CLI tool template' ;
7
+ const APP_DESCRIPTION = 'A template for CLI typescript apps' ;
8
+
9
+ const program = new Command ( ) ;
10
+ program . name ( APP_NAME ) . version ( version ) . description ( APP_DESCRIPTION ) ;
11
+
12
+ program . parse ( ) ;
Original file line number Diff line number Diff line change
1
+ declare global {
2
+ // eslint-disable-next-line no-unused-vars
3
+ namespace NodeJS {
4
+ // eslint-disable-next-line no-unused-vars
5
+ interface ProcessEnv { }
6
+ }
7
+ }
8
+
9
+ export { } ;
You can’t perform that action at this time.
0 commit comments