From 2dffae934cadc3a37900744c796cd9b78dabe102 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 09:20:35 +0100 Subject: [PATCH 1/3] Adding changelog --- .github/workflows/changelog.yml | 32 +++++++++++++++++ CHANGELOG.md | 49 +++++++++++++++++++++++++ cliff.toml | 64 +++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 .github/workflows/changelog.yml create mode 100644 CHANGELOG.md create mode 100644 cliff.toml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..9d643ae --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,32 @@ +name: Generate Changelog + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Generate changelog with git-cliff + uses: orhun/git-cliff-action@4d0efd7c7a4b55484abf71c29a29712192adebdb + with: + config: cliff.toml + args: --verbose + + - name: Upload artifacts + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 + with: + body_path: CHANGELOG.md + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dd8895a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,49 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [Unreleased] + +## [4.0.0] - 2025-01-15 + +### Changed +- Updated Ruby support to 3.3+ +- Updated dependencies +- Various CI/CD updates + +### Added +- Ruby 4.0 support in CI matrix + +## [3.0.0] - 2024-06-30 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v3.0.0) for details. + +## [2.0.1] - 2024-01-10 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v2.0.1) for details. + +## [2.0.0] - 2023-06-15 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v2.0.0) for details. + +## [1.2.1] - 2023-01-20 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v1.2.1) for details. + +## [1.2.0] - 2022-12-10 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v1.2.0) for details. + +## [1.1.1] - 2022-06-15 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v1.1.1) for details. + +## [1.1.0] - 2022-03-01 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v1.1.0) for details. + +## [1.0.0] - 2021-09-20 + +See [GitHub Releases](https://github.com/technicalpanda/awrence/releases/tag/v1.0.0) for details. + + diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 0000000..15770ab --- /dev/null +++ b/cliff.toml @@ -0,0 +1,64 @@ +# git-cliff ~ default configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +# changelog header +header = """ +# Changelog + +All notable changes to this project will be documented in this file. +""" +# template for the changelog body +# https://keats.github.io/tera/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}\ + ## [Unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | upper }} + {% for commit in commits %} + - {% if commit.breaking %}🚨 {% endif %}{{ commit.message | upper_first }} ([`{{ commit.id | truncate(length=7, end="") }}`](https://github.com/technicalpanda/awrence/commit/{{ commit.id }})) + {%- endfor %} +{% endfor %}\n +""" +# remove the leading and trailing whitespaces from the template +trim = true +# changelog footer +footer = """ + +""" + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true +# filter out the commits that are not conventional +filter_unconventional = false +# process each line of a commit as an individual commit +split_commits = false +# regex for parsing the commit messages +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^doc", group = "Documentation" }, + { message = "^perf", group = "Performance" }, + { message = "^refactor", group = "Refactoring" }, + { message = "^test", group = "Testing" }, + { message = "^ci", group = "CI/CD" }, + { message = "^chore", skip = true }, + { message = "^Bump", group = "Dependencies" }, + { message = ".*", group = "Other" }, +] +# protect breaking changes from being skipped due to matching a skipping commit_parser +protect_breaking_commits = true +# filter commits by commit scope +filter_commits = false +# regex for matching git tags +tag_pattern = "v?[0-9].*" +# regex for skipping tags +skip_tags = "" +# limit commits displayed on release notes (0 = unlimited) +limit_commits = 0 +# sorting of commits inside sections +sort_commits = "oldest" From d617f79fa999dfbf8ec2b7ebd62f2440338019ac Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 09:25:05 +0100 Subject: [PATCH 2/3] update dependabot commit messages to include chore prefix --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e5b7cc8..010e551 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,13 @@ updates: update-types: - "minor" - "patch" + commit-message: + prefix: "chore" + include: "scope" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + commit-message: + prefix: "chore" + include: "scope" From 636722e8d2470f90d9c911fcc0fa13a5e0fa5ddd Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 09:28:42 +0100 Subject: [PATCH 3/3] Moved permissions to job scope --- .github/workflows/changelog.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 9d643ae..4e2039b 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -5,12 +5,11 @@ on: tags: - "v*" -permissions: - contents: write - jobs: changelog: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v7 with: