Skip to content

Commit c0f8b76

Browse files
committed
fix: CI checks before release + primer packaging fix
- Add CI job (fmt, clippy, check, test) to release workflow - Build job now depends on CI checks passing - Fix primer.defaults.json packaging for crates.io via build.rs - Bump version to 0.5.2
1 parent 1e984bc commit c0f8b76

4 files changed

Lines changed: 47 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,35 @@ env:
1111
CARGO_TERM_COLOR: always
1212

1313
jobs:
14+
ci:
15+
name: CI Checks
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- uses: dtolnay/rust-toolchain@stable
23+
with:
24+
components: rustfmt, clippy
25+
26+
- uses: Swatinem/rust-cache@v2
27+
28+
- name: Check formatting
29+
run: cargo fmt --all -- --check
30+
31+
- name: Clippy
32+
run: cargo clippy --all-features -- -D warnings
33+
34+
- name: Check
35+
run: cargo check --all-features
36+
37+
- name: Test
38+
run: cargo test --all-features
39+
1440
build:
1541
name: Build ${{ matrix.target }}
42+
needs: ci
1643
strategy:
1744
fail-fast: false
1845
matrix:

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [0.5.1] - 2025-12-30
10+
## [0.5.2] - 2025-12-30
11+
12+
### Fixed
13+
- Fixed crates.io packaging: primer.defaults.json now included via build.rs
14+
- Fixed code formatting issues
15+
16+
### Infrastructure
17+
- Release workflow now runs CI checks (fmt, clippy, test) before building binaries
18+
19+
## [0.5.1] - 2025-12-30 [YANKED]
20+
21+
Yanked due to formatting check failure in CI.
1122

1223
### Added
1324
- **RFC-0004: Full primer implementation** with value-based section selection

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# @acp:summary "Package metadata and publishing information"
88
[package]
99
name = "acp-protocol"
10-
version = "0.5.1"
10+
version = "0.5.2"
1111
edition = "2021"
1212
authors = ["ACP Contributors"]
1313
description = "AI Context Protocol - Token-efficient and context enhancing code documentation for AI systems"

build.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ use std::path::Path;
88

99
fn copy_json_files(src_dir: &Path, dst_dir: &Path) {
1010
if src_dir.exists() {
11-
fs::create_dir_all(dst_dir).unwrap_or_else(|e| {
12-
panic!("Failed to create {:?} directory: {}", dst_dir, e)
13-
});
11+
fs::create_dir_all(dst_dir)
12+
.unwrap_or_else(|e| panic!("Failed to create {:?} directory: {}", dst_dir, e));
1413

15-
for entry in fs::read_dir(src_dir).unwrap_or_else(|e| {
16-
panic!("Failed to read {:?}: {}", src_dir, e)
17-
}) {
14+
for entry in
15+
fs::read_dir(src_dir).unwrap_or_else(|e| panic!("Failed to read {:?}: {}", src_dir, e))
16+
{
1817
let entry = entry.expect("Failed to read directory entry");
1918
let src_path = entry.path();
2019

@@ -30,16 +29,10 @@ fn copy_json_files(src_dir: &Path, dst_dir: &Path) {
3029

3130
fn main() {
3231
// Copy schema files
33-
copy_json_files(
34-
Path::new("acp-spec/schemas/v1"),
35-
Path::new("schemas/v1"),
36-
);
32+
copy_json_files(Path::new("acp-spec/schemas/v1"), Path::new("schemas/v1"));
3733

3834
// Copy primer files
39-
copy_json_files(
40-
Path::new("acp-spec/primers"),
41-
Path::new("primers"),
42-
);
35+
copy_json_files(Path::new("acp-spec/primers"), Path::new("primers"));
4336

4437
// Tell Cargo to rerun build.rs if submodule files change
4538
println!("cargo:rerun-if-changed=acp-spec/schemas/v1");

0 commit comments

Comments
 (0)