diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e310b0e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +on: + push: + tags: + - 'v*' + - 'derive-v*' + workflow_dispatch: + +name: Publish + +env: + CARGO_TERM_COLOR: always + CARGO_NET_GIT_FETCH_WITH_CLI: true + +jobs: + publish-round-based: + name: Publish round-based + environment: crates.io + runs-on: ubuntu-latest + if: >- + github.ref_type == 'tag' + && startsWith(github.ref_name, 'v') + steps: + - uses: actions/checkout@v3 + - run: cargo publish -p round-based --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} + publish-derive: + name: Publish round-based-derive + environment: crates.io + runs-on: ubuntu-latest + if: >- + github.ref_type == 'tag' + && startsWith(github.ref_name, 'derive-v') + steps: + - uses: actions/checkout@v3 + - run: cargo publish -p round-based-derive --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 67fa682..41290d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -559,7 +559,7 @@ dependencies = [ "futures-util", "matches", "phantom-type", - "round-based-derive", + "round-based-derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror", "tokio", "tokio-stream", @@ -576,6 +576,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "round-based-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0397bf224fdbcb3b286926e43bba90a96f81a82cc630ebfc9290d18e8b6331bd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "round-based-tests" version = "0.1.0" diff --git a/README.md b/README.md index b99a79c..5c5b2e5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) +![License: MIT](https://img.shields.io/crates/l/round-based.svg) [![Docs](https://docs.rs/round-based/badge.svg)](https://docs.rs/round-based) [![Crates io](https://img.shields.io/crates/v/round-based.svg)](https://crates.io/crates/round-based) diff --git a/round-based/Cargo.toml b/round-based/Cargo.toml index f1c8066..71271cd 100644 --- a/round-based/Cargo.toml +++ b/round-based/Cargo.toml @@ -7,6 +7,7 @@ description = "Driver for MPC protocols" repository = "https://github.com/ZenGo-X/round-based-protocol" categories = ["asynchronous", "cryptography", "network-programming"] keywords = ["round-based", "mpc", "protocol"] +readme = "../README.md" [package.metadata.docs.rs] all-features = true @@ -20,7 +21,7 @@ phantom-type = "0.3" tracing = "0.1" thiserror = "1" -round-based-derive = { path = "../round-based-derive", optional = true } +round-based-derive = { version = "0.2", optional = true } tokio = { version = "1", features = ["rt"], optional = true } tokio-stream = { version = "0.1", features = ["sync"], optional = true } diff --git a/round-based/src/lib.rs b/round-based/src/lib.rs index e69d4cd..ccd06f7 100644 --- a/round-based/src/lib.rs +++ b/round-based/src/lib.rs @@ -1,4 +1,4 @@ -//! [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) +//! ![License: MIT](https://img.shields.io/crates/l/round-based.svg) //! [![Docs](https://docs.rs/round-based/badge.svg)](https://docs.rs/round-based) //! [![Crates io](https://img.shields.io/crates/v/round-based.svg)](https://crates.io/crates/round-based) //!