File tree Expand file tree Collapse file tree 3 files changed +41
-17
lines changed
Expand file tree Collapse file tree 3 files changed +41
-17
lines changed 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 @@ -64,11 +64,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6464- ` badge-style ` input to choose between relative paths or GitHub URLs (default: path)
6565- Automatic README update functionality with marker support
6666- Badge markers for controlled placement in README files
67+ - Support for specific version numbers in release workflow (e.g., 1.0.0 or v1.0.0)
6768
6869### Changed
6970- Badge generation is now opt-in via ` generate-badges ` input instead of always running
7071- README updates are now opt-in via ` update-readme ` input
7172- Improved badge generation logic with better error handling
73+ - Enhanced release workflow to accept explicit version numbers in addition to major/minor/patch
7274
7375### Fixed
7476- Aligned action.yml inputs with documented features in README.md
Original file line number Diff line number Diff line change @@ -112,6 +112,20 @@ This repository includes comprehensive GitHub workflows for CI/CD:
112112
113113For detailed workflow documentation, see [.github/WORKFLOWS.md](.github/WORKFLOWS.md).
114114
115+ # ## Releasing
116+
117+ The release workflow supports both automatic semantic versioning and manual version specification :
118+
119+ **Automatic Release** (when changes are merged to main):
120+ - Automatically detects version bump from CHANGELOG.md
121+ - Creates release with extracted changelog notes
122+ - Updates major version tag (e.g., v1)
123+
124+ **Manual Release** (for specific versions):
125+ 1. Go to Actions → Release and Marketplace → Run workflow
126+ 2. Enter version as `1.0.0` or `v1.0.0` (for specific version) or `major`/`minor`/`patch` (for semantic bump)
127+ 3. The workflow will create the release and update tags
128+
115129# ## Contributing
116130
1171311. Fork the repository
You can’t perform that action at this time.
0 commit comments