Skip to content

Commit

Permalink
Updated README.md file with usage
Browse files Browse the repository at this point in the history
CI: Added publish targets to publish ci
  • Loading branch information
fpaschos committed Oct 31, 2023
1 parent 8916368 commit b3a93bb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,26 @@ jobs:
env:
CRATES_IO_TOKEN: ${{ secrets.crates_io_token }}

- name: Dry run publish proto-mapper
run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper-core
# - name: Dry run publish proto-mapper
# run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper-core --features protobuf
#
# - name: Dry run publish proto-mapper
# run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper-derive --features protobuf
#
# - name: Dry run publish proto-mapper
# run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper --features protobuf

- name: Dry run publish proto-mapper
run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper-derive
- name: Publish crate proto-mapper-core
run: cargo publish --manifest-path Cargo.toml -p proto-mapper-core --features protobuf
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}

- name: Publish crate proto-mapper-derive
run: cargo publish --manifest-path Cargo.toml -p proto-mapper-derive --features protobuf
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}

- name: Dry run publish proto-mapper
run: cargo publish --dry-run --manifest-path Cargo.toml -p proto-mapper
# - name: Publish crate prot-0mapper
# run: cargo publish --manifest-path Cargo.toml -p proto-mapper
# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}
- name: Publish crate proto-mapper
run: cargo publish --manifest-path Cargo.toml -p proto-mapper-derive --features protobuf
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
### Proto Mapper
## Proto Mapper
[![CI/main](https://github.com/fpaschos/proto-mapper/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fpaschos/proto-mapper/actions/workflows/ci.yml)

Macro implementation library for mapping between custom models and protobuf generated code
### Usage

#### Notice
First, add the dependency in `Cargo.toml`:

```toml
proto-mapper = {version = "0.1.0", features = ["protobuf"] }
```

or

```toml
proto-mapper = {version = "0.1.0", features = ["prost"] }
```

__NOTE__: Features `prost` or `protobuf` are __mutually exclusive and required__.
Use one of them according to targeted generated code proto framework that you use


### Notice
This library is an (almost) complete rewrite of the [protobuf-convert](https://github.com/aleksuss/protobuf-convert/blob/master/README.md) library.
The purpose of the rewrite is to adapt it to specific needs of our projects.
The main concept and the idea remains the same, so the credit goes to the original authors of the `protobuf-convert` library.

#### What changed
### What changed
This library:
- changes the main name of the macro to `ProtoMap`
- changes the main way the macro is used and is interfaced with external traits
Expand Down

0 comments on commit b3a93bb

Please sign in to comment.