Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
push:
tags: ["v*"]
pull_request:
types: [opened, synchronize, reopened]
Comment thread
zheylmun marked this conversation as resolved.

permissions:
contents: write
Comment thread
zheylmun marked this conversation as resolved.

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'
Comment thread
zheylmun marked this conversation as resolved.
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
# --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 }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,5 @@ fuzz/artifacts/
.omniscient/

.DS_Store

omniscient.toml
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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<justin.kovacich@luminartech.com>",
"Kimberly Kryger <kim.kryger@luminartech.com>",
"Matthew Beisser <matthew.beisser@luminartech.com>",
"Parth Patel <parth.patel@luminartech.com>",
"Zachary Heylmun <zachary.heylmun@luminartech.com>",
"Justin Kovacich <justin_kovacich@microvision.com>",
"Kimberly Kryger <kim_kryger@microvision.com>",
"Matthew Beisser <matthew_beisser@microvision.com>",
"Parth Patel <parth_patel@microvision.com>",
"Zachary Heylmun <zachary_heylmun@microvision.com>",
]

[features]
Expand Down
8 changes: 8 additions & 0 deletions release.toml
Original file line number Diff line number Diff line change
@@ -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"]
Loading