summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.auto-changelog2
-rwxr-xr-x.github/scripts/create_changelog.sh14
-rw-r--r--.github/workflows/release_dev_to_master.yaml4
-rw-r--r--.release-it.json2
-rw-r--r--changelog.hbs8
5 files changed, 21 insertions, 9 deletions
diff --git a/.auto-changelog b/.auto-changelog
index d44def5ad..ae00f1230 100644
--- a/.auto-changelog
+++ b/.auto-changelog
@@ -1,7 +1,5 @@
{
"template": "./changelog.hbs",
- "unreleased": true,
- "commitLimit": false,
"ignoreCommitPattern": "^(Release|no log:).*",
"sortCommits": "date-desc"
} \ No newline at end of file
diff --git a/.github/scripts/create_changelog.sh b/.github/scripts/create_changelog.sh
new file mode 100755
index 000000000..909a773e1
--- /dev/null
+++ b/.github/scripts/create_changelog.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+# This script is used in release-it as changelog
+# export RELEASE_MASTER=1 to release master changelog
+
+set -e
+
+master_version=$(git describe --tags --abbrev=0 --match "v[0-9].[0-9].[0-9]")
+latest_verion=$(git describe --tags --abbrev=0)
+
+if [[ $RELEASE_MASTER -eq 1 ]]; then
+ auto-changelog --stdout --starting-version $master_version --commit-limit 3
+else
+ auto-changelog --stdout --starting-version $latest_verion --unreleased --commit-limit 0
+fi \ No newline at end of file
diff --git a/.github/workflows/release_dev_to_master.yaml b/.github/workflows/release_dev_to_master.yaml
index 9df1f5e26..de338eb8d 100644
--- a/.github/workflows/release_dev_to_master.yaml
+++ b/.github/workflows/release_dev_to_master.yaml
@@ -56,7 +56,9 @@ jobs:
# TODO: Remove Stage Step
- name: Create Release
- run: release-it --ci --increment ${{ github.event.inputs.increment }}
+ run: |
+ export RELEASE_MASTER=1
+ release-it --ci --increment ${{ github.event.inputs.increment }}
Merge:
needs: Release
runs-on: ubuntu-latest
diff --git a/.release-it.json b/.release-it.json
index df5c9c8f1..d494c6446 100644
--- a/.release-it.json
+++ b/.release-it.json
@@ -1,7 +1,7 @@
{
"git": {
"requireCleanWorkingDir": false,
- "changelog": "auto-changelog --stdout",
+ "changelog": ".github/scripts/create_changelog.sh",
"tagName": "v${version}"
},
"github": {
diff --git a/changelog.hbs b/changelog.hbs
index d41d60284..aa1ae4e1d 100644
--- a/changelog.hbs
+++ b/changelog.hbs
@@ -1,8 +1,6 @@
From newest to oldest:
{{#each releases}}
- {{#if @first}}
- {{#each commits}}
- - {{subject}}{{#if href}} [{{shorthash}}]({{href}}){{/if}}
- {{/each}}
- {{/if}}
+ {{#each commits}}
+ - {{subject}}{{#if href}} [{{shorthash}}]({{href}}){{/if}}
+ {{/each}}
{{/each}} \ No newline at end of file