Simplify release process by using cargo-release

This commit is contained in:
Maybe Waffle 2023-02-28 20:45:39 +04:00
parent 430175278d
commit e4f30e729a
5 changed files with 26 additions and 3 deletions

View file

@ -11,3 +11,7 @@ edition = "2021"
license = "MIT"
homepage = "https://github.com/teloxide/teloxide"
repository = "https://github.com/teloxide/teloxide"
[workspace.metadata.release]
tag-message = "Release {{crate_name}} version {{version}}"
tag-name = "{{prefix}}v{{version}}"

View file

@ -98,6 +98,14 @@ rustdoc-args = ["--cfg", "docsrs", "-Znormalize-docs"]
# https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[package.metadata.release]
tag-prefix = "core-"
enable-features = ["full"]
pre-release-replacements = [
{file="README.md", search="teloxide-core = \"[^\"]+\"", replace="teloxide-core = \"{{version}}\""},
{file="src/lib.rs", search="teloxide-core = \"[^\"]+\"", replace="teloxide-core = \"{{version}}\""},
{file="CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]
[[example]]
name = "self_info"

View file

@ -5,7 +5,7 @@
//! asynchronous and built using [`tokio`].
//!
//!```toml
//! teloxide_core = "0.9"
//! teloxide-core = "0.9"
//! ```
//! _Compiler support: requires rustc 1.64+_.
//!

View file

@ -13,13 +13,17 @@ documentation = "https://docs.rs/teloxide-core/"
# FIXME: add a simple readme for teloxide-macros
#readme = "README.md"
[lib]
proc-macro = true
[dependencies]
quote = "1.0.7"
proc-macro2 = "1.0.19"
syn = { version = "1.0.13", features = ["full"] }
heck = "0.4.0"
[package.metadata.release]
tag-prefix = "macros-"
pre-release-replacements = [
{file="CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]

View file

@ -127,6 +127,13 @@ rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "dep_docsrs"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[package.metadata.release]
tag-prefix = ""
enable-features = ["full"]
pre-release-replacements = [
{file="../../README.md", search="teloxide = \\{ version = \"[^\"]+\"", replace="teloxide = { version = \"{{version}}\""},
{file="../../CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]
[[test]]
name = "redis"