Skip to content

Commit 55fa29a

Browse files
committed
release: bump version to 0.1.2
- Fix GitHub Actions release workflow binary name - Add automatic changelog integration - Update all crate versions to 0.1.2
1 parent bc6aac7 commit 55fa29a

File tree

13 files changed

+75
-17
lines changed

13 files changed

+75
-17
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,50 @@ jobs:
2727
else
2828
echo "prerelease=false" >> $GITHUB_ENV
2929
fi
30+
- name: Extract changelog entry
31+
id: changelog
32+
run: |
33+
VERSION="${{ github.ref_name }}"
34+
# Remove 'v' prefix if present
35+
VERSION_NUM="${VERSION#v}"
36+
37+
# Extract the section for this version from CHANGELOG.md
38+
if [ -f "CHANGELOG.md" ]; then
39+
# Get content between this version and the next version/end of file
40+
CHANGELOG_ENTRY=$(awk -v version="$VERSION_NUM" '
41+
/^## \[/ {
42+
if (found) exit
43+
if ($0 ~ "\\[" version "\\]") found=1
44+
next
45+
}
46+
found && !/^$/ { content = content $0 "\n" }
47+
END { print content }
48+
' CHANGELOG.md)
49+
50+
# Save to file and environment
51+
if [ -n "$CHANGELOG_ENTRY" ]; then
52+
echo "$CHANGELOG_ENTRY" > release_notes.md
53+
echo "HAS_CHANGELOG=true" >> $GITHUB_ENV
54+
else
55+
echo "HAS_CHANGELOG=false" >> $GITHUB_ENV
56+
fi
57+
else
58+
echo "HAS_CHANGELOG=false" >> $GITHUB_ENV
59+
fi
60+
3061
- name: Create Release
31-
run: gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --generate-notes ${{ env.prerelease == 'true' && '--prerelease' || '' }}
62+
run: |
63+
if [ "${{ env.HAS_CHANGELOG }}" = "true" ] && [ -s release_notes.md ]; then
64+
gh release create ${{ github.ref_name }} \
65+
--title "Release ${{ github.ref_name }}" \
66+
--notes-file release_notes.md \
67+
${{ env.prerelease == 'true' && '--prerelease' || '' }}
68+
else
69+
gh release create ${{ github.ref_name }} \
70+
--title "Release ${{ github.ref_name }}" \
71+
--generate-notes \
72+
${{ env.prerelease == 'true' && '--prerelease' || '' }}
73+
fi
3274
env:
3375
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3476

@@ -77,7 +119,7 @@ jobs:
77119
- name: Create archive
78120
shell: bash
79121
run: |
80-
binary_name="code-guardian-cli${{ matrix.suffix }}"
122+
binary_name="code_guardian_cli${{ matrix.suffix }}"
81123
if [ "${{ matrix.os }}" = "windows-latest" ]; then
82124
archive_name="code-guardian-${{ matrix.target }}.zip"
83125
cp "target/${{ matrix.target }}/release/${binary_name}" .

.opencode/agent/testing-agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >-
44
55
<example>
66
Context: The user needs to improve test coverage.
7-
user: "How can I achieve 80% test coverage for the core module?"
7+
user: "How can I achieve82% test coverage for the core module?"
88
assistant: "I'm going to use the Task tool to launch the testing-agent to write and optimize tests."
99
<commentary>
1010
Since the user is requesting testing help, use the testing-agent.
@@ -17,7 +17,7 @@ mode: subagent
1717
The Testing Agent is a specialized AI agent for testing in code-guardian, ensuring code quality through unit/integration tests and coverage.
1818

1919
## Purpose
20-
To write tests, achieve 80%+ coverage, set up infrastructure, and fix bugs.
20+
To write tests, achieve82%+ coverage, set up infrastructure, and fix bugs.
2121

2222
## Inputs/Outputs
2323
- **Inputs**: Code to test, coverage goals.
@@ -30,7 +30,7 @@ To write tests, achieve 80%+ coverage, set up infrastructure, and fix bugs.
3030

3131
## Usage Examples
3232
### Example 1: Improving Coverage
33-
- Input: "Achieve 80% coverage for core module."
33+
- Input: "Achieve82% coverage for core module."
3434
- Process: Write tests, run tarpaulin.
3535
- Output: Test suite with coverage report.
3636

.opencode/command/cargo-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
description: Run tests with coverage
33
agent: testing-agent
44
---
5-
Execute `cargo test` and analyze results. Focus on failures, suggest improvements, and aim for 80%+ coverage.
5+
Execute `cargo test` and analyze results. Focus on failures, suggest improvements, and aim for82%+ coverage.
66
Test output: !`cargo test`

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- **Types**: Use strong typing; prefer `&str` over `String` for parameters; use `Result<T, E>` for fallible operations
1515
- **Error Handling**: Use `thiserror` for custom errors, `anyhow` for generic errors; prefer `?` operator
1616
- **Documentation**: Document public APIs with `///` comments; use `cargo doc` to generate docs
17-
- **Testing**: Write unit tests with `#[test]`; use `#[cfg(test)]` modules; aim for 80%+ coverage
17+
- **Testing**: Write unit tests with `#[test]`; use `#[cfg(test)]` modules; aim for82%+ coverage
1818
- **Concurrency**: Use `rayon` for parallelism; prefer channels over shared state
1919
- **Serialization**: Use `serde` with derive macros; prefer JSON/YAML over binary formats
2020

@@ -58,7 +58,7 @@
5858
- Review code across agents for integration
5959

6060
## Quality Control
61-
- 80%+ test coverage
61+
-82%+ test coverage
6262
- Pass CI/CD before merge
6363
- Adhere to modular architecture
6464

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
55
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

8+
## [0.1.2] - 2025-01-09
9+
10+
### Fixed
11+
- GitHub Actions release workflow binary name mismatch (code-guardian-cli vs code_guardian_cli)
12+
- Duplicate anyhow import in monitoring module
13+
- Syntax error in CLI main.rs tracing initialization
14+
15+
### Added
16+
- Automatic changelog integration in release workflow
17+
- Enhanced release descriptions from CHANGELOG.md
18+
- Comprehensive workflow issue analysis and documentation
19+
20+
### Changed
21+
- Release workflow now extracts and uses proper changelog content
22+
- Improved error handling in release process
23+
- Updated existing v0.1.1 release with proper description
24+
825
## [0.1.1] - 2025-10-09
926

1027
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This project follows a code of conduct to ensure a welcoming environment for all
4444
### Testing
4545
- Write unit tests for all new code using `#[test]`
4646
- Use `#[cfg(test)]` modules for test-specific code
47-
- Aim for 80%+ test coverage
47+
- Aim for82%+ test coverage
4848
- Run tests with `cargo test`
4949

5050
### Performance

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.
274274
Quick checklist:
275275
1. Follow the guidelines in `AGENTS.md`
276276
2. Keep modules under 500 lines of code
277-
3. Maintain 80%+ test coverage
277+
3. Maintain82%+ test coverage
278278
4. Use conventional commit messages
279279

280280
## License

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "code_guardian_cli"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55

66
[dependencies]

crates/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ enum GitAction {
381381
#[tokio::main]
382382
async fn main() -> Result<()> {
383383
// Initialize tracing
384-
tracing_subscriber::fmt::init();
384+
tracing_subscriber::fmt()
385385
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
386386
.init();
387387

crates/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "code-guardian-core"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55

66
[dependencies]

0 commit comments

Comments
 (0)