ci: Adding changelog generation as well as changes to pipelines
This commit is contained in:
parent
1aa8ce45ac
commit
3ac7a8c6ff
|
@ -3,8 +3,7 @@ name: Build Project
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*/*'
|
||||
- '!release/*'
|
||||
- '**'
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
let versionRegex = /(\nversion=)([0-9.-]+)/;
|
||||
|
||||
const tracker = {
|
||||
filename: 'gradle.properties',
|
||||
updater: {
|
||||
'readVersion': (contents) => {
|
||||
return versionRegex.exec(contents)[2];
|
||||
},
|
||||
'writeVersion': (contents, version) => {
|
||||
return contents.replace(versionRegex, `$1${version}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
bumpFiles: [tracker],
|
||||
packageFiles: [tracker]
|
||||
}
|
14
build.gradle
14
build.gradle
|
@ -183,3 +183,17 @@ task runJar() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
task updateChangelog(type: Exec) {
|
||||
commandLine 'cmd', '/c', 'npx standard-version'
|
||||
ext.output = {
|
||||
return standardOutput.toString()
|
||||
}
|
||||
}
|
||||
|
||||
task updateChangelogPreRelease(type: Exec) {
|
||||
commandLine 'cmd', '/c', 'npx standard-version --prerelease'
|
||||
ext.output = {
|
||||
return standardOutput.toString()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue