ci: Adding changelog generation as well as changes to pipelines

This commit is contained in:
Sekwah 2021-05-12 01:19:01 +01:00
parent 1aa8ce45ac
commit 3ac7a8c6ff
No known key found for this signature in database
GPG Key ID: C3BE2E6C861A461A
3 changed files with 33 additions and 2 deletions

View File

@ -3,8 +3,7 @@ name: Build Project
on:
push:
branches:
- '*/*'
- '!release/*'
- '**'
tags:
- '*'
pull_request:

18
.versionrc.js Normal file
View File

@ -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]
}

View File

@ -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()
}
}