mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2026-04-05 00:56:54 +00:00
ci: add release job
This commit is contained in:
parent
1ffd33d395
commit
7ccafb1f5f
6 changed files with 1132 additions and 104 deletions
15
.github/tasks/actionYamlUpdater.js
vendored
Normal file
15
.github/tasks/actionYamlUpdater.js
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const yaml = require('yaml')
|
||||
|
||||
yaml.scalarOptions.str.fold.lineWidth = 100
|
||||
|
||||
const versionRegex = /\d+\.\d+\.\d+/
|
||||
|
||||
module.exports.readVersion = contents =>
|
||||
yaml.parse(contents).runs.image.match(versionRegex)[0]
|
||||
|
||||
module.exports.writeVersion = (contents, version) => {
|
||||
const actionFile = yaml.parse(contents)
|
||||
actionFile.runs.image = actionFile.runs.image.replace(versionRegex, version)
|
||||
|
||||
return yaml.stringify(actionFile)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue