File tree 3 files changed +42
-2
lines changed 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ publish-npm :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+ - uses : actions/setup-node@v2
14
+ with :
15
+ node-version : ' 16'
16
+ registry-url : ' https://registry.npmjs.org'
17
+ - name : Install dependencies
18
+ run : npm ci
19
+ - name : Publish
20
+ run : |
21
+ VERSION=$(node tasks/next-dev-version.js)
22
+ npm --no-git-tag-version version ${VERSION}
23
+ npm publish --tag dev
24
+ env :
25
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " mock-fs" ,
3
3
"description" : " A configurable mock file system. You know, for testing." ,
4
- "version" : " 5.0.0-beta.1 " ,
4
+ "version" : " 4.14.0 " ,
5
5
"main" : " lib/index.js" ,
6
6
"homepage" : " https://github.com/tschaub/mock-fs" ,
7
7
"author" : {
28
28
" lib"
29
29
],
30
30
"scripts" : {
31
- "lint" : " eslint benchmarks lib test" ,
31
+ "lint" : " eslint benchmarks lib test tasks " ,
32
32
"pretest" : " npm run lint" ,
33
33
"test" : " mocha --recursive test"
34
34
},
Original file line number Diff line number Diff line change
1
+ const semver = require ( 'semver' ) ;
2
+ const pkg = require ( '../package.json' ) ;
3
+
4
+ function nextVersion ( ) {
5
+ const version = pkg . version ;
6
+ const s = semver . parse ( version ) ;
7
+ if ( ! s ) {
8
+ throw new Error ( `Invalid version ${ version } ` ) ;
9
+ }
10
+ return `${ s . major } .${ s . minor } .${ s . patch } -dev.${ Date . now ( ) } ` ;
11
+ }
12
+
13
+ if ( require . main === module ) {
14
+ process . stdout . write ( `${ nextVersion ( ) } \n` ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments