fix: changelog commits logic #10
Workflow file for this run
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 generation | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| generate: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: Install gitchglog | |
| run: | | |
| wget https://github.com/git-chglog/git-chglog/releases/download/v0.15.4/git-chglog_0.15.4_linux_amd64.tar.gz | |
| tar -xvzf git-chglog_0.15.4_linux_amd64.tar.gz | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| repository: "Govcraft/rust-docs-mcp-server" | |
| ref: ${{ github.head_ref }} | |
| - name: Generate changelog | |
| run: | | |
| git switch -c changelog-update | |
| ./git-chglog -o CHANGELOG.md | |
| - name: Check in CHANGELOG | |
| run: | | |
| # merge the changelog-update branch into the main branch | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add './CHANGELOG.md' | |
| git commit -m "chore(docs): update CHANGELOG for latest tag" | |
| git checkout main | |
| git merge changelog-update --no-ff -m "chore(docs): update CHANGELOG for latest tag" | |
| git push |