diff --git a/.github/release.sh b/.github/release.sh new file mode 100755 index 0000000..4599564 --- /dev/null +++ b/.github/release.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -e + +# Check if version argument is provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi +new_version=$1 + +# Update changelog +git cliff -o CHANGELOG.md + +# Update version in Cargo.toml +sed -i "s/^version = \"[0-9]*\.[0-9]*\.[0-9]*\"\$/version = \"$new_version\"/" "Cargo.toml" + +# Create and push tag +git tag -a v$new_version -m "v$new_version" + +git push origin v$new_version + +git cliff -o CHANGELOG.md + +gmsg "🎉 $new_version released" || true diff --git a/CHANGELOG.md b/CHANGELOG.md index b23d07e..738666c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.5.2](https://github.com/vemonet/ptrie/compare/v0.5.1..v0.5.2) - 2023-12-21 + +### ⚙️ Miscellaneous Tasks + +- Bump to 0.5.2 - ([b46ced6](https://github.com/vemonet/ptrie/commit/b46ced6bde2ce59d061b212ac6a9fbbad4faae75)) + ## [0.5.1](https://github.com/vemonet/ptrie/compare/v0.5.0..v0.5.1) - 2023-12-21 ### ⚙️ Miscellaneous Tasks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3cda5f6..1818483 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,9 +70,7 @@ Publishing artifacts will be done by the `build.yml` workflow, make sure you hav 2. Bump the version in the `Cargo.toml` file, create a new tag with `git`, and update changelog using [`git-cliff`](https://git-cliff.org): ```bash - git tag -a v0.5.0 -m "v0.5.0" - git push origin v0.5.0 - git cliff -o CHANGELOG.md + ./.github/release.sh 0.5.0 ``` 3. Commit, and push. The `release.yml` workflow will automatically create the release on GitHub, and publish to crates.io.