diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07d7641b..35ac2e23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,19 +23,27 @@ jobs: uses: orhun/git-cliff-action@v2 id: git-cliff with: + config: cliff.toml args: --verbose --latest + env: + OUTPUT: git-cliff-changes.tmp.md - name: Update the changelog run: | - echo "${{ steps.git-cliff.outputs.contents }}" | sed -i "3r /dev/stdin" CHANGELOG.md + git checkout main + cat git-cliff-changes.tmp.md | sed -i "3r /dev/stdin" CHANGELOG.md git config --global user.name 'Github Action' git config --global user.email 'github.action@users.noreply.github.com' - git commit -am "chore: update changelog" + git add CHANGELOG.md + git commit -m "chore: update CHANGELOG.md" git push - name: Update CONTRIBUTORS.md run: | + git checkout main + poetry install poetry run poe generate_contributors_md if [[ $(git diff --stat CONTRIBUTORS.md) != '' ]]; then - git commit -am "chore: update CONTRIBUTORS.md" + git add CONTRIBUTORS.md + git commit -m "chore: update CONTRIBUTORS.md" git push fi - name: Release diff --git a/cliff.toml b/cliff.toml index a9df45a9..ab22e333 100644 --- a/cliff.toml +++ b/cliff.toml @@ -8,7 +8,7 @@ body = """ {% else %}\ ## [unreleased] {% endif %}\ -More details: https://github.com/openlawlibrary/pygls/releases/tag/v{{version}} +More details: https://github.com/openlawlibrary/pygls/releases/tag/{{version}} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %}