diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b4c89af..bab99db 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -106,17 +106,22 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} publish: - if: >- - github.event_name == 'push' && - github.ref == 'refs/heads/master' && - contains(github.event.head_commit.modified, 'Cargo.toml') + if: github.event_name == 'push' && github.ref == 'refs/heads/master' needs: [test, clippy_check, format_check, security_audit] runs-on: ubicloud-standard-2 steps: - name: Checkout code uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + fetch-depth: 0 - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable - name: Publish a reviewed version bump env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: cargo publish --registry crates-io + BEFORE_SHA: ${{ github.event.before }} + run: | + if git diff --quiet "$BEFORE_SHA" "$GITHUB_SHA" -- Cargo.toml; then + echo "Cargo.toml did not change; nothing to publish" + exit 0 + fi + cargo publish --registry crates-io diff --git a/Cargo.toml b/Cargo.toml index c182168..14fe1cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "endpoint-libs" -version = "3.0.2" +version = "3.0.3" edition = "2024" authors = ["Veon "] description = "Launch MCP services fast: describe endpoints once in RON, and endpoint-gen generates the Rust models, docs and MCP tool schemas that this crate serves over WebSocket RPC, with roles and typed errors built in."