Skip to content

Commit 2b9ace2

Browse files
Release v0.10.2 (#7)
* chore(release): prepare v0.10.2 * fix(release): handle [Unreleased] section in changelog generation - Workflow now inserts new version AFTER [Unreleased], not before - Fixed misplaced [Unreleased] section in CHANGELOG.md - Added 0.10.2 entry for recent changes (#5, #6) - Consolidated duplicate 0.10.1 entries Signed-off-by: assagman <ahmetsercansagman@gmail.com> --------- Signed-off-by: assagman <ahmetsercansagman@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: assagman <ahmetsercansagman@gmail.com>
1 parent 2d60d2f commit 2b9ace2

3 files changed

Lines changed: 34 additions & 23 deletions

File tree

.github/workflows/release-pr.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,25 @@ jobs:
174174
echo "$ENTRY" > /tmp/changelog_entry.md
175175
176176
# Prepend to CHANGELOG.md if it exists
177-
# Preserves full header (everything before first "## [" section marker)
177+
# Handles [Unreleased] section: insert new version AFTER it
178178
if [ -f "CHANGELOG.md" ]; then
179-
# Find line number of first version section (## [x.y.z] or ## [Unreleased])
180-
HEADER_END=$(grep -n '^## \[' CHANGELOG.md | head -1 | cut -d: -f1)
181-
if [ -n "$HEADER_END" ]; then
182-
HEADER_END=$((HEADER_END - 1))
183-
head -n "$HEADER_END" CHANGELOG.md > /tmp/changelog_new.md
179+
# Check for [Unreleased] section (case-insensitive)
180+
UNRELEASED_LINE=$(grep -in '^## \[Unreleased\]' CHANGELOG.md | head -1 | cut -d: -f1)
181+
# Find first versioned section (## [x.y.z])
182+
FIRST_VERSION_LINE=$(grep -n '^## \[[0-9]' CHANGELOG.md | head -1 | cut -d: -f1)
183+
184+
if [ -n "$UNRELEASED_LINE" ]; then
185+
# Has [Unreleased] section - insert new version after it
186+
head -n "$UNRELEASED_LINE" CHANGELOG.md > /tmp/changelog_new.md
187+
echo "" >> /tmp/changelog_new.md
188+
cat /tmp/changelog_entry.md >> /tmp/changelog_new.md
189+
tail -n +"$((UNRELEASED_LINE + 1))" CHANGELOG.md >> /tmp/changelog_new.md
190+
elif [ -n "$FIRST_VERSION_LINE" ]; then
191+
# No [Unreleased], insert before first version section
192+
head -n "$((FIRST_VERSION_LINE - 1))" CHANGELOG.md > /tmp/changelog_new.md
184193
echo "" >> /tmp/changelog_new.md
185194
cat /tmp/changelog_entry.md >> /tmp/changelog_new.md
186-
tail -n +"$((HEADER_END + 1))" CHANGELOG.md >> /tmp/changelog_new.md
195+
tail -n +"$FIRST_VERSION_LINE" CHANGELOG.md >> /tmp/changelog_new.md
187196
else
188197
# No version sections found, append to end
189198
cat CHANGELOG.md > /tmp/changelog_new.md

CHANGELOG.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9-
## [0.10.1] - 2026-01-15
9+
## [Unreleased]
10+
11+
## [0.10.2] - 2026-01-16
1012

1113
### Added
12-
- **schema**: add jsonc support with trailing commas and comments (#1)
14+
- **make**: add workflow targets with fzf interactive prompts (#6)
1315

1416
### Fixed
15-
- **release**: validate custom version input and include all changelog entries (#3)
17+
- **ci**: update npm to latest for OIDC trusted publishing (#5)
1618

17-
### Changed
18-
- ignore .opencode
19-
20-
21-
## [Unreleased]
22-
23-
## [0.10.1] - 2026-01-16
19+
## [0.10.1] - 2026-01-15
2420

2521
### Added
26-
- **JSON Schema JSONC support**: Schema now allows trailing commas and comments for better editor compatibility
22+
- **JSON Schema JSONC support**: Schema now allows trailing commas and comments for better editor compatibility (#1)
23+
24+
### Fixed
25+
- **Release workflow**: Validate custom version input and include all changelog entries (#3)
2726

2827
### CI/CD
29-
- **Automated release workflows**: New `release-pr.yml` and `release-publish.yml` for automated versioning and npm publishing
30-
- **OIDC npm publishing**: Secure npm publishing using GitHub OIDC tokens (no npm tokens stored)
31-
- **Custom version validation**: Release workflow validates custom version input format
28+
- Automated release workflows (`release-pr.yml`, `release-publish.yml`) for versioning and npm publishing (#2)
29+
- OIDC npm publishing using GitHub OIDC tokens (no npm tokens stored)
30+
31+
### Changed
32+
- Ignore `.opencode` directory
3233

3334
### Documentation
3435
- Updated RELEASE.md with automation instructions
@@ -211,7 +212,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
211212

212213
---
213214

214-
[Unreleased]: https://github.com/assagman/opencode-toolbox/compare/v0.10.1...HEAD
215+
[Unreleased]: https://github.com/assagman/opencode-toolbox/compare/v0.10.2...HEAD
216+
[0.10.2]: https://github.com/assagman/opencode-toolbox/compare/v0.10.1...v0.10.2
215217
[0.10.1]: https://github.com/assagman/opencode-toolbox/compare/v0.10.0...v0.10.1
216218
[0.10.0]: https://github.com/assagman/opencode-toolbox/compare/v0.9.0...v0.10.0
217219
[0.9.0]: https://github.com/assagman/opencode-toolbox/compare/v0.8.0...v0.9.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-toolbox",
3-
"version": "0.10.1",
3+
"version": "0.10.2",
44
"description": "Tool Search Tool Plugin for OpenCode - search and execute tools from MCP servers on-demand",
55
"main": "dist/index.js",
66
"module": "dist/index.js",

0 commit comments

Comments
 (0)