diff --git a/.block b/.block index 625b730..a544d37 100644 --- a/.block +++ b/.block @@ -1,4 +1,4 @@ { - "blocked": [".claude-plugin/plugin.json"], + "blocked": [".claude-plugin/plugin.json", "opencode/package.json"], "guide": "The CI pipeline updates the plugin version - do not modify manually." } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3c24b0..b65f8a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -469,11 +469,27 @@ jobs: f.write('\n') " + - name: Update CHANGELOG version + run: | + python -c " + import datetime, pathlib, sys + version = '${{ needs.version.outputs.majorMinorPatch }}' + today = datetime.date.today().strftime('%Y-%m-%d') + p = pathlib.Path('CHANGELOG.md') + text = p.read_text(encoding='utf-8') + if '## Unreleased' not in text: + print('No ## Unreleased section found, skipping') + sys.exit(0) + text = text.replace('## Unreleased', f'## v{version} ({today})', 1) + p.write_text(text, encoding='utf-8') + print(f'Updated CHANGELOG.md: ## Unreleased -> ## v{version} ({today})') + " + - name: Commit and tag run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add .claude-plugin/plugin.json opencode/package.json + git add .claude-plugin/plugin.json opencode/package.json CHANGELOG.md git commit -m "Bump version to ${{ needs.version.outputs.majorMinorPatch }}" git push origin main git tag -a "v${{ needs.version.outputs.majorMinorPatch }}" -m "Release v${{ needs.version.outputs.majorMinorPatch }}"