diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 563ba95..a6015e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -485,31 +485,22 @@ jobs: with: fetch-depth: 0 # get all tags - - name: Get release notes - id: get_release_notes - run: | - # Get the latest tag - latest_tag=$(git describe --tags --abbrev=0) - echo "latest_tag=${latest_tag}" >> $GITHUB_ENV - - # Extract release notes from CHANGELOG.md - # This script extracts the content between the latest tag and the previous tag. - notes=$(awk -v tag="## [${latest_tag##v}]" ' - BEGIN { p = 0 } - index($0, tag) { p = 1; next } - p && /^## / { exit } - p { print } - ' CHANGELOG.md) - echo "notes<> $GITHUB_OUTPUT - echo "$notes" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + - name: Generate a changelog + uses: orhun/git-cliff-action@v4 + id: git-cliff + with: + config: cliff.toml + args: -vv --latest --strip header + env: + OUTPUT: CHANGELOG.md + GITHUB_REPO: ${{ github.repository }} - name: Create Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ env.latest_tag }} - name: "Release ${{ env.latest_tag }}" - body: ${{ steps.get_release_notes.outputs.notes }} + tag_name: ${{ github.ref_name }} + name: "Release ${{ github.ref_name }}" + body: ${{ steps.git-cliff.outputs.content }} draft: false prerelease: contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') env: diff --git a/cliff.toml b/cliff.toml index bf55b84..00b7929 100644 --- a/cliff.toml +++ b/cliff.toml @@ -20,7 +20,7 @@ body = """ {%- set commit_message = commit.message -%} {%- endif -%} * {{ commit_message | split(pat="\n") | first | trim }}\ - {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} + {% if commit.remote.username %} by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}){%- endif -%} {% if commit.remote.pr_number %} in \ [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ {%- endif %} diff --git a/pyproject.toml b/pyproject.toml index 50096d2..9721e13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: MacOS :: MacOS X",