feat: add changelog to release (#11)
- closes #5 Co-authored-by: Michael Kriese <michael.kriese@visualon.de> Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/11
This commit is contained in:
parent
e4af9c28af
commit
c2199f0640
4 changed files with 2910 additions and 1 deletions
|
@ -14,11 +14,13 @@ pipeline:
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- apk add --no-cache git
|
- apk add --no-cache git npm
|
||||||
- helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
|
- helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
|
||||||
- helm dependency build
|
- helm dependency build
|
||||||
- rm -rf tmp/
|
- rm -rf tmp/
|
||||||
- helm package --version "${CI_COMMIT_TAG##v}" -d tmp/ ./
|
- helm package --version "${CI_COMMIT_TAG##v}" -d tmp/ ./
|
||||||
|
- npm ci
|
||||||
|
- npm run changelog "${CI_COMMIT_TAG##v}" tmp/changelog.md
|
||||||
secrets:
|
secrets:
|
||||||
- token
|
- token
|
||||||
|
|
||||||
|
@ -32,6 +34,7 @@ pipeline:
|
||||||
files: tmp/*
|
files: tmp/*
|
||||||
title: ${CI_COMMIT_TAG##v}
|
title: ${CI_COMMIT_TAG##v}
|
||||||
file_exists: fail
|
file_exists: fail
|
||||||
|
note: tmp/changelog.md
|
||||||
|
|
||||||
publish-chart:
|
publish-chart:
|
||||||
image: alpine:3.17.0
|
image: alpine:3.17.0
|
||||||
|
|
2885
package-lock.json
generated
2885
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,11 +9,14 @@
|
||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"changelog": "node tools/changelog.mjs",
|
||||||
"readme:lint": "markdownlint *.md -f",
|
"readme:lint": "markdownlint *.md -f",
|
||||||
"readme:parameters": "readme-generator -v values.yaml -r README.md"
|
"readme:parameters": "readme-generator -v values.yaml -r README.md"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@bitnami/readme-generator-for-helm": "^2.4.2",
|
"@bitnami/readme-generator-for-helm": "^2.4.2",
|
||||||
|
"conventional-changelog-conventionalcommits": "^5.0.0",
|
||||||
|
"conventional-changelog-core": "^4.2.4",
|
||||||
"markdownlint-cli": "^0.32.0"
|
"markdownlint-cli": "^0.32.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
tools/changelog.mjs
Normal file
18
tools/changelog.mjs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import conventionalChangelogCore from 'conventional-changelog-core';
|
||||||
|
import conventionalChangelogPreset from 'conventional-changelog-conventionalcommits';
|
||||||
|
import fs from "node:fs"
|
||||||
|
|
||||||
|
const config = conventionalChangelogPreset();
|
||||||
|
|
||||||
|
const file = process.argv[3] ? fs.createWriteStream(process.argv[3]): process.stdout;
|
||||||
|
|
||||||
|
conventionalChangelogCore(
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
releaseCount: 2,
|
||||||
|
},
|
||||||
|
{ version: process.argv[2], linkCompare: false },
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
{ headerPartial: '' }
|
||||||
|
).pipe(file);
|
Loading…
Reference in a new issue