{"slug": "auto-versioning-changelog-generation-using-github-action", "title": "Auto versioning + changelog generation using Github Action", "summary": "This article explains how to set up an automated versioning and changelog generation system using GitHub Actions and the semantic-release tool. The system works by analyzing commit messages that follow the Conventional Commits format (feat, fix, breaking change) to automatically determine version bumps, generate changelogs, create git tags, and publish GitHub releases. The guide provides step-by-step instructions for configuring the necessary files, including `.releaserc.json` and a GitHub Actions workflow file.", "body_md": "Auto versioning + changelog generation is a very real production pattern used in open-source and SaaS teams to avoid messy release notes and manual tagging.\nWe’ll build a clean system using:\n``` plaintext id=\"flow0\"\ncommit → push → GitHub Action\n↓\nanalyze commits\n↓\nbump version (patch/minor/major)\n↓\ngenerate changelog\n↓\ncreate git tag\n↓\ncreate GitHub release\n---\n# 📦 1. Install required tool (standard approach)\nWe’ll use:\n👉 **semantic-release** (industry standard)\n``` bash id=\"inst1\"\nnpm install --save-dev semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github\nYour commits MUST follow this format:\n``` bash id=\"c1\"\nfeat: add user login system\n### Fix (patch version bump)\n``` bash id=\"c2\"\nfix: resolve navbar bug on mobile\n``` bash id=\"c3\"\nfeat!: redesign API structure\nor\n``` bash id=\"c4\"\nBREAKING CHANGE: remove old auth system\n.releaserc.json\n``` json id=\"r1\"\n{\n\"branches\": [\"main\"],\n\"plugins\": [\n\"@semantic-release/commit-analyzer\",\n\"@semantic-release/release-notes-generator\",\n\"@semantic-release/changelog\",\n\"@semantic-release/github\",\n[\n\"@semantic-release/git\",\n{\n\"assets\": [\"package.json\", \"CHANGELOG.md\"],\n\"message\": \"chore(release): ${nextRelease.version} [skip ci]\\n\\n${nextRelease.notes}\"\n}\n]\n]\n}\n---\n# 📜 4. Create CHANGELOG file\n``` bash id=\"ch1\"\ntouch CHANGELOG.md\nStart empty:\n``` md id=\"ch2\"\nAll notable changes will be documented here.\n---\n# 🚀 5. GitHub Actions workflow (AUTO VERSION + CHANGELOG)\n## 📁 `.github/workflows/release.yml`\n``` yaml id=\"w1\"\nname: Auto Version & Changelog\non:\npush:\nbranches:\n- main\njobs:\nrelease:\nruns-on: ubuntu-latest\nsteps:\n- uses: actions/checkout@v4\nwith:\nfetch-depth: 0\n- name: Setup Node\nuses: actions/setup-node@v4\nwith:\nnode-version: 20\n- name: Install dependencies\nrun: npm install\n- name: Run semantic release\nenv:\nGITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\nrun: npx semantic-release\nWhen you push to main\n:\nDecide version bump:\nGenerate changelog\nCreate Git tag\nCreate GitHub Release\nUpdate CHANGELOG.md\n``` md id=\"log1\"\nGitHub will automatically create:\n``` plaintext id=\"rel1\"\nv1.2.0 - Production Release\nFeatures:\nFixes:\nMake sure this exists:\n``` plaintext id=\"sec1\"\nGITHUB_TOKEN (auto provided by GitHub Actions)\nNo extra setup required.\n---\n# 🧪 10. Real workflow in action\n### Developer flow:\n``` plaintext id=\"flow1\"\ngit commit -m \"feat: add dashboard UI\"\ngit push origin main\nfeat\n)``` yaml id=\"npm1\"\n``` yaml id=\"slack1\"\n``` json id=\"branch1\"\n\"branches\": [\"main\", \"next\"]\n---\n## 🟣 Changelog formatting customization\nYou can group commits like:\n* Features\n* Fixes\n* Performance\n* Breaking changes\n---\n# ⚠️ 12. Common mistakes\n### ❌ Not using conventional commits\n→ versioning won’t work properly\n### ❌ Pushing messy commit messages\n``` bash id=\"bad1\"\nfix stuff\nupdate\n→ release history breaks\n``` plaintext id=\"final1\"\nCommit (feat/fix/breaking)\n↓\nGitHub Action triggers\n↓\nsemantic-release analyzes commits\n↓\nbumps version automatically\n↓\nupdates CHANGELOG.md\n↓\ncreates git tag + GitHub release\n---\n# 🚀 What you just built (REAL DEVOPS LEVEL)\nYou now have:\n* 🤖 Automated versioning\n* 📜 Auto changelog generation\n* 🏷️ Git tags + GitHub releases\n* 🚀 CI/CD-ready release pipeline", "url": "https://wpnews.pro/news/auto-versioning-changelog-generation-using-github-action", "canonical_source": "https://dev.to/kyl67899/auto-versioning-changelog-generation-using-github-action-13hd", "published_at": "2026-05-23 21:01:19+00:00", "updated_at": "2026-05-23 21:31:55.645462+00:00", "lang": "en", "topics": ["developer-tools", "open-source"], "entities": ["GitHub Action", "semantic-release"], "alternates": {"html": "https://wpnews.pro/news/auto-versioning-changelog-generation-using-github-action", "markdown": "https://wpnews.pro/news/auto-versioning-changelog-generation-using-github-action.md", "text": "https://wpnews.pro/news/auto-versioning-changelog-generation-using-github-action.txt", "jsonld": "https://wpnews.pro/news/auto-versioning-changelog-generation-using-github-action.jsonld"}}