mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-09-27 22:57:39 +02:00
ci: Adding changelog generation as well as changes to pipelines
This commit is contained in:
parent
1aa8ce45ac
commit
3ac7a8c6ff
3
.github/workflows/gradle.yml
vendored
3
.github/workflows/gradle.yml
vendored
@ -3,8 +3,7 @@ name: Build Project
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*/*'
|
- '**'
|
||||||
- '!release/*'
|
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
18
.versionrc.js
Normal file
18
.versionrc.js
Normal 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]
|
||||||
|
}
|
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
Block a user