Skip to content

Bump version from 3.0.10 to 3.0.11 #11

Bump version from 3.0.10 to 3.0.11

Bump version from 3.0.10 to 3.0.11 #11

Workflow file for this run

# filepath: .github/workflows/changelog.yml
name: Generate Changelog
on:
workflow_dispatch: # Manual trigger
inputs:
version:
description: 'Version tag (e.g., v3.0.4)'
required: false
type: string
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog:
name: Generate Changelog
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for changelog generation
- name: Install git-cliff
run: |
wget https://github.com/orhun/git-cliff/releases/download/v2.7.0/git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz
tar -xzf git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz
sudo mv git-cliff-2.7.0/git-cliff /usr/local/bin/
chmod +x /usr/local/bin/git-cliff
- name: Generate full CHANGELOG
run: |
git-cliff --output CHANGELOG.md
- name: Generate release notes for latest tag
if: startsWith(github.ref, 'refs/tags/')
run: |
# Get the latest tag
LATEST_TAG=$(git describe --tags --abbrev=0)
# Generate changelog for this release only
git-cliff --latest --strip header > RELEASE_NOTES.md
echo "Release notes for ${LATEST_TAG}:"
cat RELEASE_NOTES.md
- name: Commit and push CHANGELOG
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
if git diff --staged --quiet; then
echo "No changes to CHANGELOG.md"
else
git commit -m "chore: update CHANGELOG.md"
git push origin HEAD:master || git push origin HEAD:main
fi
- name: Create/Update Release with Changelog
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}