File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,23 +120,31 @@ jobs:
120120
121121 echo "Bump type: $BUMP_TYPE"
122122
123- # Apply version bump
124- case "$BUMP_TYPE" in
125- major|MAJOR)
126- MAJOR=$((MAJOR + 1))
127- MINOR=0
128- PATCH=0
129- ;;
130- minor|MINOR)
131- MINOR=$((MINOR + 1))
132- PATCH=0
133- ;;
134- patch|PATCH|*)
135- PATCH=$((PATCH + 1))
136- ;;
137- esac
138-
139- NEW_VERSION="v${MAJOR}.${MINOR}.${PATCH}"
123+ # Check if BUMP_TYPE is a specific version (e.g., 1.0.0 or v1.0.0)
124+ if [[ "$BUMP_TYPE" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
125+ # Strip 'v' prefix if present
126+ BUMP_TYPE="${BUMP_TYPE#v}"
127+ echo "Using specific version: $BUMP_TYPE"
128+ NEW_VERSION="v${BUMP_TYPE}"
129+ else
130+ # Apply semantic version bump
131+ case "$BUMP_TYPE" in
132+ major|MAJOR)
133+ MAJOR=$((MAJOR + 1))
134+ MINOR=0
135+ PATCH=0
136+ ;;
137+ minor|MINOR)
138+ MINOR=$((MINOR + 1))
139+ PATCH=0
140+ ;;
141+ patch|PATCH|*)
142+ PATCH=$((PATCH + 1))
143+ ;;
144+ esac
145+
146+ NEW_VERSION="v${MAJOR}.${MINOR}.${PATCH}"
147+ fi
140148
141149 echo "Previous version: $LATEST_TAG"
142150 echo "New version: $NEW_VERSION"
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6565- Changelog validation in release process
6666- Security audit workflow with Dependabot
6767- Lint and test workflow for PRs and pushes
68+ - Support for specific version numbers in release workflow (e.g., 1.0.0 or v1.0.0)
69+
70+ ### Changed
71+ - Enhanced release workflow to accept explicit version numbers in addition to major/minor/patch
6872
6973## [ 1.0.0] - Previous Release
7074
Original file line number Diff line number Diff line change @@ -95,6 +95,20 @@ This repository includes comprehensive GitHub workflows for CI/CD:
9595
9696For detailed workflow documentation, see [.github/WORKFLOWS.md](.github/WORKFLOWS.md).
9797
98+ # ## Releasing
99+
100+ The release workflow supports both automatic semantic versioning and manual version specification :
101+
102+ **Automatic Release** (when changes are merged to main):
103+ - Automatically detects version bump from CHANGELOG.md
104+ - Creates release with extracted changelog notes
105+ - Updates major version tag (e.g., v1)
106+
107+ **Manual Release** (for specific versions):
108+ 1. Go to Actions → Release and Marketplace → Run workflow
109+ 2. Enter version as `1.0.0` or `v1.0.0` (for specific version) or `major`/`minor`/`patch` (for semantic bump)
110+ 3. The workflow will create the release and update tags
111+
98112# ## Contributing
99113
1001141. Fork the repository
You can’t perform that action at this time.
0 commit comments