Project: Release and CHANGELOG
Introduction
Shipping a version ties Git tags, package version numbers, release notes, and optional GitHub Releases together. This project bumps a semver, updates CHANGELOG.md, tags v1.0.0, pushes, and publishes a release—mirroring how Maven, Gradle, and npm projects ship.
Prerequisites
- Tags and Releases
- Project: Personal Learning Repository
- Repo with meaningful commits on
main
Prepare CHANGELOG
Create or update CHANGELOG.md:
Format inspired by Keep a Changelog.
Commit unreleased section separately during development; move items into version section at release time.
Bump Package Version (Pick Your Stack)
npm / Node
npm version 1.0.0 -m "chore: release v1.0.0"Code explanation:
- Updates
package.json, commits, createsv1.0.0tag
Maven
Edit pom.xml:
<version>1.0.0</version>git add pom.xml CHANGELOG.md
git commit -m "chore: release v1.0.0"
git tag -a v1.0.0 -m "Release 1.0.0"Gradle
version = '1.0.0'Same commit + tag flow as Maven.
Align tag name v1.0.0 with package version 1.0.0.
Finalize CHANGELOG for Release
Move [Unreleased] items into [1.0.0] section; leave empty [Unreleased] heading.
git add CHANGELOG.md
git commit -m "docs: finalize changelog for v1.0.0"If npm version already committed, amend or single release commit—avoid duplicate tags.
Push Branch and Tag
git push origin main
git push origin v1.0.0Verify tag on GitHub Tags tab.
Create GitHub Release
- Releases → Draft a new release
- Choose tag
v1.0.0 - Title:
v1.0.0 - Description: copy
[1.0.0]section from CHANGELOG - Attach build artifact if applicable (JAR, zip)
- Publish
Optional CI workflow builds artifact on tag push—see Git and CI/CD.
Patch Release Drill
After bugfix on main:
- Bump to
1.0.1 - Add CHANGELOG section
- Tag
v1.0.1, push, release
SemVer patch = backward-compatible fix.
Checklist
-
CHANGELOG.mddocuments user-visible changes - Package version matches tag (minus
vprefix) - Tag pushed to remote
- GitHub Release published with notes
FAQ
Tag exists locally not remote?
git push origin v1.0.0.
npm version wrong tag?
git tag -d v1.0.0 locally, fix, retag carefully—never retag public releases casually.
CHANGELOG vs commit messages?
Commits for developers; CHANGELOG curated for users—group related commits.
Pre-release versions?
Use 1.0.0-beta.1 tag for testers—document in CHANGELOG.
Monorepo versions?
Each package may tag independently—advanced; single package first.
Deploy from tag?
Many pipelines checkout tag SHA for reproducible builds—tie to Nginx deploy after CI build.