Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Automate release publishing
- Tag the commit;
- Build changelog;

Checkout cargo-make, cargo-release.


Discussion / hints:

Fix patch:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..5ba23ca9a
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,27 @@
+# Contributing to sigma-rust
+
+Thanks for wanting to contribute! There are many ways to contribute and we
+appreciate any level you're willing to do.
+
+To get started checkout issues labeled ["help wanted" and "good first issue"](https://github.com/ergoplatform/sigma-rust/labels/help%20wanted)
+
+## Process
+As a heads up, we'll be running your PR through the following CI jobs:
+- warnings turned to compile errors
+- `cargo test`
+- `rustfmt` (we recommend to setup running `rustfmt` on file save)
+- `clippy`
+
+## Releasing
+When we're ready to release, a project owner should do the following:
+
+- Create(checkout) a release branch (naming convention `release/vX-Y-Z` using the `ergo-lib` version);
+- `cargo release minor --dry-run -vv` if you intend to bump a minor version or
+  `cargo release major --dry-run -vv` if you intend to bump a major version (add
+  `--exclude sigma-ser` if you want to skip `sigma-ser` release);
+- check the output and run it without `--dry-run` to actually execute it;
+- Build and publish npm package (`cd bindings/ergo-lib-wasm && npm run publish-nodejs && npm run publish-browser`);
+- Merge release branch into develop
+- Merge release branch into master
+- Make a github release
+
diff --git a/README.md b/README.md
index b974121ce..f43ff0ea7 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,10 @@ Bindings:
 - [ergo-lib-jni](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-jni) [![Latest Version](https://img.shields.io/crates/v/ergo-lib-jni.svg)](https://crates.io/crates/ergo-lib-jni) [![Documentation](https://docs.rs/ergo-lib-jni/badge.svg)](https://docs.rs/crate/ergo-lib-jni)
 - [ergo-lib-c](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-c) [![Latest Version](https://img.shields.io/crates/v/ergo-lib-c.svg)](https://crates.io/crates/ergo-lib-c) [![Documentation](https://docs.rs/ergo-lib-c/badge.svg)](https://docs.rs/crate/ergo-lib-c)
 
+## Changelog
+See [CHANGELOG.md](ergo-lib/CHANGELOG.md).
+
 ## Contributing
-Contributions are very welcome! Checkout issues labeled ["help wanted" and "good first issue"](https://github.com/ergoplatform/sigma-rust/labels/help%20wanted)
-We check code formatting and linter(`clippy`) as part of the CI process. It's better to set up your editor to run `rustfmt` on file save. Feel free to disable specific linter rules in the source code when appropriate.
+See [Contributing](CONTRIBUTING.md) guide.
 
-You are welcome to join the [Ergo Discord](https://discord.gg/kj7s7nb) and ask questions on `#sigma-rust` channel.
+Feel free to join the [Ergo Discord](https://discord.gg/kj7s7nb) and ask questions on `#sigma-rust` channel.
diff --git a/bindings/ergo-lib-c-core/Cargo.toml b/bindings/ergo-lib-c-core/Cargo.toml
index 10ae11a51..f914c1466 100644
--- a/bindings/ergo-lib-c-core/Cargo.toml
+++ b/bindings/ergo-lib-c-core/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ergo-lib-c-core"
-version = "0.1.0"
+version = "0.2.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
diff --git a/bindings/ergo-lib-c/Cargo.toml b/bindings/ergo-lib-c/Cargo.toml
index 3e07a9abf..dc7bb1718 100644
--- a/bindings/ergo-lib-c/Cargo.toml
+++ b/bindings/ergo-lib-c/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ergo-lib-c"
-version = "0.1.0"
+version = "0.2.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
@@ -16,4 +16,4 @@ crate-type = ["staticlib"]
 
 [dependencies]
 ergo-lib = {version = "0.2.0", path = "../../ergo-lib"}
-ergo-lib-c-core = {version = "0.1.0", path = "../ergo-lib-c-core"}
+ergo-lib-c-core = {version = "0.2.0", path = "../ergo-lib-c-core"}
diff --git a/bindings/ergo-lib-jni/Cargo.toml b/bindings/ergo-lib-jni/Cargo.toml
index 7e8996813..5c0b064a7 100644
--- a/bindings/ergo-lib-jni/Cargo.toml
+++ b/bindings/ergo-lib-jni/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ergo-lib-jni"
-version = "0.1.0"
+version = "0.2.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
@@ -17,4 +17,4 @@ jni = "0.17.0"
 failure = "0.1"
 log = "0.4"
 ergo-lib = {version = "0.2.0", path = "../../ergo-lib"}
-ergo-lib-c-core = {version = "0.1.0", path = "../ergo-lib-c-core"}
+ergo-lib-c-core = {version = "0.2.0", path = "../ergo-lib-c-core"}
diff --git a/ergo-lib/CHANGELOG.md b/ergo-lib/CHANGELOG.md
new file mode 100644
index 000000000..9ab2b96d5
--- /dev/null
+++ b/ergo-lib/CHANGELOG.md
@@ -0,0 +1,43 @@
+# Change Log
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/)
+and this project adheres to [Semantic Versioning](http://semver.org/).
+
+<!-- next-header -->
+## [Unreleased] - ReleaseDate
+
+### Added
+
+- Add value extraction API for Constant (e.g i64::try_extract_from(constant))  [#111](https://github.com/ergoplatform/sigma-rust/pull/111).
+- Implement From<BoxId> for DataInput [#113](https://github.com/ergoplatform/sigma-rust/pull/113).
+- Add data inputs to TxBuilder [#115](https://github.com/ergoplatform/sigma-rust/pull/115).
+- Read/Write register values in ErgoBox, ErgoBoxCandidate [#116](https://github.com/ergoplatform/sigma-rust/pull/116).
+- Add tokens support in TxBuilder and ErgoBoxCandidateBuilder [#118](https://github.com/ergoplatform/sigma-rust/pull/118).
+- Implement JSON encoding/decoding for UnsignedTransaction [#123](https://github.com/ergoplatform/sigma-rust/pull/123).
+- Add TxBuilder::estimate_tx_size_bytes() to get estimated serialized transaction size in bytes after signing (assuming P2PK box spending); tx_builder::SUGGESTED_TX_FEE constant with "default" current tx fee used lately (1100000 nanoERGs); [#128](https://github.com/ergoplatform/sigma-rust/pull/128).
+- Add checks when minting token for minting token exclusivity and registers overwrite [#129](https://github.com/ergoplatform/sigma-rust/pull/129).
+- Add transaction validity checks in TxBuilder [#130](https://github.com/ergoplatform/sigma-rust/pull/130).
+- Use TokenAmount instead of u64 in sum_tokens*() [#130](https://github.com/ergoplatform/sigma-rust/pull/130).
+- Add TokenAmount::checked*() ops [#130](https://github.com/ergoplatform/sigma-rust/pull/130).
+- Add I64::as_num() in WASM bindings [#130](https://github.com/ergoplatform/sigma-rust/pull/130)
+ 
+
+### Changed
+
+- box_id, box_value and register modules made private in ergo_box module and all types are re-exported from ergo_box module itself [#131](https://github.com/ergoplatform/sigma-rust/pull/131).
+
+
+## [0.2.0] - 2020-10-06
+
+### Added
+
+- Binary serialization;
+- JSON serialization;
+- Box, Transaction building;
+- Transaction signing (P2PK only);
+- ErgoTree constant values conversion.
+
+<!-- next-url -->
+[Unreleased]: https://github.com/ergoplatform/sigma-rust/compare/v0.2.0...HEAD
+[0.2.0]: https://github.com/ergoplatform/sigma-rust/compare/v0.1.0...v0.2.0        
diff --git a/ergo-lib/release.toml b/ergo-lib/release.toml
new file mode 100644
index 000000000..8c3622893
--- /dev/null
+++ b/ergo-lib/release.toml
@@ -0,0 +1,7 @@
+pre-release-replacements = [
+  {file="CHANGELOG.md", search="Unreleased", replace="{{version}}"},
+  {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly = 1},
+  {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}"},
+  {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate", exactly = 1},
+  {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/ergoplatform/sigma-rust/compare/{{tag_name}}...HEAD", exactly = 1},
+]
diff --git a/release.toml b/release.toml
new file mode 100644
index 000000000..0555daaf4
--- /dev/null
+++ b/release.toml
@@ -0,0 +1,5 @@
+no-dev-version = true
+sign-commit = true
+sign-tag = true
+
+


Test patch: