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
18 changes: 18 additions & 0 deletions .github/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[changelog]
header = "### Changelog\n\n"
body = """
{% for commit in commits %}\
- {{ commit.message | split(pat="\n") | first }} (`{{ commit.id | truncate(length=7, end="") }}`)
{% endfor %}
"""
footer = ""
trim = true

[git]
conventional_commits = false
filter_unconventional = false
filter_commits = false
commit_parsers = []
# The rolling development tag must not become a changelog boundary.
tag_pattern = '^v[0-9]+\.[0-9]+\.[0-9]+$'
sort_commits = "newest"
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ jobs:
sha256sum apple-docs-* > checksums.txt
cat checksums.txt

- name: Generate changelog
uses: orhun/git-cliff-action@v4
with:
version: v2.14.1
config: .github/cliff.toml
args: --use-branch-tags ${{ needs.prepare.outputs.is_prerelease == 'true' && '--unreleased' || '--current' }}
env:
OUTPUT: dist/changelog.md

- name: Prepare release notes
run: |
if [ "${{ needs.prepare.outputs.is_prerelease }}" = "true" ]; then
Expand All @@ -125,6 +134,8 @@ jobs:
-e 's/{{BUILD_DATE}}/${{ needs.prepare.outputs.build_date }}/g' \
-e 's|{{REPOSITORY}}|${{ github.repository }}|g' \
"$TEMPLATE" > dist/release-notes.md
printf '\n' >> dist/release-notes.md
cat dist/changelog.md >> dist/release-notes.md
cat dist/release-notes.md

- name: Delete existing latest release (pre-release only)
Expand Down
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
brew "actionlint"
brew "dprint"
brew "git-cliff"
brew "pre-commit"
brew "swiftlint"
Loading