Merge pull request #1303 from Mrwicks00/chore/1255-1256-1257-1258-ci-… #186
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-changelog: | |
| name: Generate and Commit CHANGELOG | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| with: | |
| fetch-depth: 0 | |
| # Run the binary directly rather than orhun/git-cliff-action. The action | |
| # marshals the whole changelog back through $GITHUB_OUTPUT with a heredoc | |
| # and fails on this repo's output ("Invalid value. Matching delimiter not | |
| # found 'EOF'"). Nothing here consumes that output — we only need | |
| # CHANGELOG.md on disk. | |
| - name: Install git-cliff | |
| env: | |
| GIT_CLIFF_VERSION: "2.13.1" | |
| run: | | |
| set -euo pipefail | |
| TARBALL="git-cliff-${GIT_CLIFF_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | |
| curl -sSfL --retry 3 \ | |
| "https://github.com/orhun/git-cliff/releases/download/v${GIT_CLIFF_VERSION}/${TARBALL}" \ | |
| -o "$TARBALL" | |
| curl -sSfL --retry 3 \ | |
| "https://github.com/orhun/git-cliff/releases/download/v${GIT_CLIFF_VERSION}/${TARBALL}.sha512" \ | |
| -o "${TARBALL}.sha512" | |
| sha512sum -c "${TARBALL}.sha512" | |
| tar -xzf "$TARBALL" | |
| sudo install -m755 "git-cliff-${GIT_CLIFF_VERSION}/git-cliff" /usr/local/bin/git-cliff | |
| git-cliff --version | |
| - name: Generate CHANGELOG.md | |
| run: git-cliff --config cliff.toml --output CHANGELOG.md | |
| - name: Commit and push CHANGELOG.md | |
| uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5 | |
| with: | |
| file_pattern: CHANGELOG.md | |
| commit_message: "chore(changelog): update changelog [skip ci]" | |
| commit_user_name: github-actions[bot] | |
| commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com |