Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# git-cliff ~ configuration file

[changelog]
body = """
## What's Changed {%- if version %} in {{ version }}{%- endif -%}

{% for commit in commits %}
{%- if commit.remote.pr_title %}
* {{ commit.remote.pr_title | split(pat="\n") | first | trim }}\
{% if commit.remote.pr_number %} ([#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})){%- endif -%}
{%- endif -%}
{%- endfor -%}

{% if version %}
{% if previous.version %}
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
{% endif %}
{% else -%}
{% raw %}\n{% endraw %}
{% endif %}

{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
"""
trim = true
postprocessors = []

[git]
conventional_commits = false
filter_unconventional = true
split_commits = false
filter_commits = false
topo_order = false
sort_commits = "newest"

commit_parsers = [
{ field = "github.pr_title", pattern = "build\\(deps.*\\)", skip = true },
{ field = "github.pr_title", pattern = "chore\\(release\\)", skip = true },
]
30 changes: 0 additions & 30 deletions .github/chglog/CHANGELOG.tpl.md

This file was deleted.

39 changes: 0 additions & 39 deletions .github/chglog/config.yml

This file was deleted.

43 changes: 31 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,46 @@ jobs:
POWERAPI_INSTALL_METHOD=pypi
POWERAPI_VERSION=${{ steps.meta.outputs.version }}

github-release:
name: Publish GitHub release
generate-release-notes:
name: Generate release notes
runs-on: ubuntu-latest
needs: [publish-python-package, docker-image]
needs: [pre-checks]
permissions:
contents: write
env:
CHGLOG_VERSION: "0.15.4"
contents: read

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Generate version changelog
run: |
set -euo pipefail
export BASE_URL="https://github.com/git-chglog/git-chglog/releases/download"
export FILENAME="git-chglog_${CHGLOG_VERSION}_linux_amd64.tar.gz"
curl -fsSL "${BASE_URL}/v${CHGLOG_VERSION}/${FILENAME}" |sudo tar xz --no-same-owner -C /usr/local/bin git-chglog
git-chglog --config .github/chglog/config.yml --output CHANGELOG.md "${GITHUB_REF_NAME}"
uses: orhun/git-cliff-action@c93ef52f3d0ddcdcc9bd5447d98d458a11cd4f72 # v4.7.1
with:
config: .cliff.toml
args: --no-exec --latest
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}

- name: Upload release notes artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: "release-notes"
path: CHANGELOG.md
if-no-files-found: error

github-release:
name: Publish GitHub release
runs-on: ubuntu-latest
needs: [publish-python-package, docker-image, generate-release-notes]
permissions:
contents: write

steps:
- name: Download release notes artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: "release-notes"

- name: Create GitHub release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
Expand Down
Loading