Commit 11f459a
authored
fix: resolve GitHub Actions workflow version detection and error handling issues (#23)
* fix: correct version bump detection logic in GitHub Actions workflow
- Fix conditional logic that incorrectly detected version bump requirements
- Change from exit code checking to output pattern matching for cz bump --dry-run
- Improve error handling with proper stderr capture (2>&1)
- Add clearer logging messages for version bump decisions
- Handle changelog generation failures gracefully
The previous logic failed because cz bump --dry-run returns non-zero exit code
even when version bump is needed, due to changelog generation errors.
Now we check for 'bump: version' pattern in output instead of exit code.
Fixes the issue where workflow showed 'No version bump needed' while actually
detecting version changes (e.g., 0.2.0 → 0.2.1 PATCH increment).
* fix: add comprehensive error handling and debugging for commitizen workflow
- Add fallback manual tag creation when commitizen bump fails
- Include detailed debugging information for CI environment
- Display commitizen config, git status, tags, and recent commits
- Improve error handling with graceful fallbacks
- Add informative logging with emoji indicators for better readability
This should resolve the 'exit code 16' errors by providing alternative
tag creation methods and better visibility into CI environment state.
* fix: improve error handling for commitizen dry-run failures
- Add conditional error handling for cz bump --dry-run
- Use 'true' fallback to prevent script exit on commitizen errors
- Better logging of exit codes and error conditions
- Ensure version detection continues even if commitizen returns non-zero
This should prevent the workflow from failing due to commitizen exit code 16
while still capturing and processing the version bump information.
* fix: add tag existence check to prevent duplicate tag errors
- Check if tag already exists before manual creation
- Graceful handling when target tag already present
- Prevent 'tag already exists' fatal errors
- Better logging for tag creation status
This resolves the 'fatal: tag already exists' error that occurs
when attempting to create tags that were previously created.
* fix: test version bump calculation from 0.2.0 baseline
This commit should trigger a PATCH version bump from 0.2.0 → 0.2.1
* chore: remove test file used for version bump validation
---------
Signed-off-by: 拐爷&&老拐瘦 <[email protected]>1 parent 7d38812 commit 11f459a
1 file changed
+43
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
73 | 98 | | |
74 | 99 | | |
75 | 100 | | |
| |||
88 | 113 | | |
89 | 114 | | |
90 | 115 | | |
91 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
92 | 133 | | |
93 | 134 | | |
94 | 135 | | |
| |||
0 commit comments