From ffe2429526eec972ffc44530fbc214d544a8d99f Mon Sep 17 00:00:00 2001 From: Justin Kovacich Date: Mon, 29 Jun 2026 18:07:36 -0400 Subject: [PATCH 1/3] build(release): add cargo-release tooling and publish workflow --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ Cargo.toml | 10 ++++----- release.toml | 8 +++++++ 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 release.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2391708 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + tags: ["v*"] + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: write + +jobs: + semver-checks: + name: Semver Checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: obi1kenobi/cargo-semver-checks-action@v2 + with: + package: uds_protocol + + publish: + name: Publish to crates.io + needs: semver-checks + if: github.event_name == 'push' && vars.UDS_PROTOCOL_PUBLISH_ENABLED == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-release --version '^0.25' --locked + - run: cargo release publish --no-confirm --execute + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index 9241df4..c2a0561 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ documentation = "https://docs.rs/uds_protocol" keywords = ["uds", "iso-14229", "automotive", "diagnostics", "obd"] categories = ["encoding", "embedded", "hardware-support"] authors = [ - "Justin Kovacich", - "Kimberly Kryger ", - "Matthew Beisser ", - "Parth Patel ", - "Zachary Heylmun ", + "Justin Kovacich ", + "Kimberly Kryger ", + "Matthew Beisser ", + "Parth Patel ", + "Zachary Heylmun ", ] [features] diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..031f861 --- /dev/null +++ b/release.toml @@ -0,0 +1,8 @@ +# cargo-release config for the standalone uds_protocol repo (single crate). +publish = false +registry = "crates-io" +tag-name = "v{{version}}" +tag-message = "uds_protocol v{{version}}" +pre-release-commit-message = "chore(release): v{{version}}" +allow-branch = ["main"] +pre-release-hook = ["cargo", "test", "--locked"] From 76312fa6655ba4de5097f8ab0034efe4b4ea5200 Mon Sep 17 00:00:00 2001 From: Justin Kovacich Date: Tue, 30 Jun 2026 04:32:48 -0400 Subject: [PATCH 2/3] ci: allow publish from detached HEAD on tag push (--allow-branch '*') --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2391708..2dc858c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,9 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - run: cargo install cargo-release --version '^0.25' --locked - - run: cargo release publish --no-confirm --execute + # --allow-branch '*': a tag-push CI run is in detached-HEAD state, which + # cargo-release's branch check would otherwise reject. Publishing is + # already gated by the job `if:` above; this only relaxes the ref check. + - run: cargo release publish --allow-branch '*' --no-confirm --execute env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} From a9af89f3967e61593a50217531cfa43480ee119b Mon Sep 17 00:00:00 2001 From: Zach Date: Mon, 6 Jul 2026 10:36:54 -0400 Subject: [PATCH 3/3] ignore semantic search config --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f69dcae..44e7887 100644 --- a/.gitignore +++ b/.gitignore @@ -330,3 +330,5 @@ fuzz/artifacts/ .omniscient/ .DS_Store + +omniscient.toml