File tree Expand file tree Collapse file tree 8 files changed +68
-5
lines changed Expand file tree Collapse file tree 8 files changed +68
-5
lines changed Original file line number Diff line number Diff line change 36
36
"ts": "never",
37
37
}
38
38
]
39
- }
39
+ },
40
+ "overrides": [
41
+ {
42
+ "files": ["scripts/*.js"],
43
+ "env": { "node": true },
44
+ "rules": {
45
+ "@typescript-eslint/no-var-requires": ["off"],
46
+ "no-console": ["off"]
47
+ }
48
+ }
49
+ ]
40
50
}
Original file line number Diff line number Diff line change 8
8
directory : " /"
9
9
schedule :
10
10
interval : " daily"
11
+ target-branch : " develop"
11
12
labels :
12
13
- " dependencies"
13
14
commit-message :
Original file line number Diff line number Diff line change
1
+ name : Create release
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' v*'
6
+
7
+ jobs :
8
+ release :
9
+ name : Create release
10
+ runs-on : ubuntu-18.04
11
+
12
+ steps :
13
+ - name : Checkout repo
14
+ uses : actions/checkout@master
15
+ - name : Setup Node.js version
16
+ uses : actions/setup-node@master
17
+ with :
18
+ node-version : ' 12.16.1'
19
+
20
+ - name : Generate release body
21
+ run : |
22
+ yarn extract-latest-change-log
23
+ - name : Create release
24
+ id : create-release
25
+ uses : actions/create-release@v1
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+ with :
29
+ tag_name : ${{ github.ref }}
30
+ release_name : ${{ github.ref }}
31
+ draft : false
32
+ prerelease : false
33
+ body_path : RELEASE_BODY.md
Original file line number Diff line number Diff line change
1
+ {
2
+ "header": "# Changelog\n"
3
+ }
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
- All notable changes to this project will be documented in this file. See [ standard-version] ( https://github.com/conventional-changelog/standard-version ) for commit guidelines.
4
-
5
3
### [ 1.0.1] ( https://github.com/icelam/html-inline-script-webpack-plugin/compare/v1.0.0...v1.0.1 ) (2021-01-22)
6
4
7
5
Original file line number Diff line number Diff line change 3
3
[ ![ Latest version] ( https://img.shields.io/github/v/release/icelam/html-inline-script-webpack-plugin.svg?sort=semver&label=latest )] ( https://github.com/icelam/html-inline-script-webpack-plugin/releases )
4
4
[ ![ Download count] ( https://img.shields.io/npm/dm/html-inline-script-webpack-plugin )] ( https://www.npmjs.com/package/html-inline-script-webpack-plugin )
5
5
[ ![ Install size] ( https://packagephobia.com/badge?p=html-inline-script-webpack-plugin )] ( https://packagephobia.com/result?p=html-inline-script-webpack-plugin )
6
- <!-- [](https://packagequality.com/#?package=html-inline-script-webpack-plugin)-->
6
+ ![ Build test] ( https://github.com/icelam/html-inline-script-webpack-plugin/workflows/Build%20test/badge.svg )
7
+ [ ![ Package quality] ( https://npm.packagequality.com/shield/html-inline-script-webpack-plugin.svg )] ( https://packagequality.com/#?package=html-inline-script-webpack-plugin )
7
8
8
9
A webpack plugin for converting external script files ` <script src="app.js"></script> ` to inline script block ` <script>...</script> ` . Requires [ html-webpack-plugin] ( https://github.com/jantimon/html-webpack-plugin ) to work.
9
10
Original file line number Diff line number Diff line change 8
8
"lint" : " eslint --ext .ts,js src" ,
9
9
"prepare" : " install-peers" ,
10
10
"first-release" : " npx standard-version --commit-all --tag-prefix v --first-release" ,
11
- "release" : " npx standard-version --commit-all --tag-prefix v"
11
+ "release" : " npx standard-version --commit-all --tag-prefix v" ,
12
+ "extract-latest-change-log" : " node scripts/extractLatestChangeLog.js"
12
13
},
13
14
"author" : " Ice Lam" ,
14
15
"repository" : {
Original file line number Diff line number Diff line change
1
+ const fs = require ( 'fs' ) . promises ;
2
+ const path = require ( 'path' ) ;
3
+
4
+ const BASE_DIR = path . join ( __dirname , '..' ) ;
5
+ const CHANGELOG_PATH = path . join ( BASE_DIR , 'CHANGELOG.md' ) ;
6
+ const RELEASE_BODY_PATH = path . join ( BASE_DIR , 'RELEASE_BODY.md' ) ;
7
+
8
+ ( async ( ) => {
9
+ try {
10
+ const file = await fs . readFile ( CHANGELOG_PATH , 'utf8' ) ;
11
+ const updated = / ( # + \[ \d + \. \d + \. \d + ] .* ?) # + \[ ? \d + \. \d + \. \d + ] ?/ s. exec ( file ) ;
12
+ await fs . writeFile ( RELEASE_BODY_PATH , updated [ 1 ] ) ;
13
+ } catch ( error ) {
14
+ console . error ( error ) ;
15
+ }
16
+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments