Skip to content

Commit 10c3452

Browse files
fix: replace gren with custom action because gren doesn't handle previous tag properly (#40)
Signed-off-by: Harikrishnan Balagopal <[email protected]>
1 parent 6b09a5d commit 10c3452

File tree

2 files changed

+15
-46
lines changed

2 files changed

+15
-46
lines changed

.github/workflows/release.yml

+6-20
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,13 @@ jobs:
7979
with:
8080
ref: ${{ github.event.inputs.commit_ref }}
8181
fetch-depth: 0
82-
- id: parse_semver
83-
uses: booxmedialtd/ws-action-parse-semver@v1
84-
with:
85-
input_string: ${{ github.event.inputs.tag }}
86-
- uses: actions/setup-node@v1
87-
with:
88-
node-version: "12"
8982
- name: create release draft
90-
shell: bash
91-
run: |
92-
npm install [email protected] -g
93-
options=()
94-
if [[ '${{ steps.semver_parser.outputs.prerelease }}' ]] ; then
95-
options+=( '--prerelease' )
96-
fi
97-
if [[ '${{ github.event.inputs.prev_tag }}' ]] ; then
98-
options+=('--tags' '${{ github.event.inputs.tag }}..${{ github.event.inputs.prev_tag }}')
99-
else
100-
options+=('--tags' '${{ github.event.inputs.tag }}')
101-
fi
102-
gren release --draft "${options[@]}" --username=${{ github.repository_owner }} --repo=${{ github.event.repository.name }} --token=${{ secrets.GITHUB_TOKEN }}
83+
uses: konveyor/create-release-draft@v1
84+
with:
85+
token: ${{ secrets.GITHUB_TOKEN }}
86+
tag: ${{ github.event.inputs.tag }}
87+
prev_tag: ${{ github.event.inputs.prev_tag }}
88+
config: .grenrc.js
10389
- uses: azure/setup-helm@v1
10490
- run: IMAGE_TAG='${{ github.event.inputs.tag }}' make prepare-for-release
10591
- run: helm package helm-charts/move2kube

.grenrc.js

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
1-
let printPreamble = true;
2-
const preamble = `For more documentation and support please visit https://konveyor.io/move2kube/
3-
# Changelog
4-
`;
5-
6-
function printPreambleAndGroupName({ heading }) {
7-
const line = `\n## ${heading}\n`;
8-
if (printPreamble) {
9-
printPreamble = false;
10-
return preamble + line;
11-
}
12-
return line;
13-
}
14-
151
module.exports = {
16-
"dataSource": "prs",
17-
"prefix": "[WIP] Move2Kube Operator ",
2+
title_prefix: "[WIP] Move2Kube Operator ",
183
// valid PR types: ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert']
19-
"groupBy":
20-
{
21-
"🚀 Features": ["enhancement", "feat", "perf"],
22-
"🐛 Bug Fixes": ["bug", "fix", "revert"],
23-
"🧹 Maintenance": ["docs", "style", "refactor", "test", "build", "ci", "chore"]
24-
},
25-
"template": {
26-
"group": printPreambleAndGroupName,
27-
"issue": ({ name, text, url }) => `- ${name} [${text}](${url})`,
28-
}
4+
sections: [
5+
{ title: "🚀 Features", labels: ["enhancement", "feat", "perf"] },
6+
{ title: "🐛 Bug Fixes", labels: ["bug", "fix", "revert"] },
7+
{ title: "🧹 Maintenance", labels: ["docs", "style", "refactor", "test", "build", "ci", "chore"] },
8+
],
9+
header: `For more documentation and support please visit https://konveyor.io/move2kube/
10+
# Changelog`,
11+
line_template: x => `- ${x.title} [#${x.number}](${x.html_url})`,
2912
}

0 commit comments

Comments
 (0)