From 40ebf32854c60e5d6e2c45b31d4a2055e7c22c2f Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sun, 19 Nov 2023 22:29:28 +0200 Subject: [PATCH 1/2] ci: Set up release automation with release-plz --- .github/workflows/release-plz.yml | 27 +++++++++++++++++++++++++++ cliff.toml | 2 +- release-plz.toml | 8 ++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-plz.yml create mode 100644 release-plz.toml diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..1ef842e --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,27 @@ +name: Release automation + +on: + push: + branches: + - main + - master + +jobs: + release-plz: + name: Release-plz + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.RELEASE_PLZ_TOKEN }} + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/cliff.toml b/cliff.toml index 6d0cc3a..af06b2b 100644 --- a/cliff.toml +++ b/cliff.toml @@ -30,7 +30,7 @@ header = """ All notable changes to this project will be documented in this file. -The format is similar to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +The format is similar to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n """ body = """ diff --git a/release-plz.toml b/release-plz.toml new file mode 100644 index 0000000..d5fa424 --- /dev/null +++ b/release-plz.toml @@ -0,0 +1,8 @@ +[workspace] +# git-cliff configuration +changelog_config = "cliff.toml" +changelog_update = true +git_tag_enable = true +git_release_enable = true +pr_labels = ["release"] +semver_check = true From 002a786af54b0acdb8ddc3794b4e1a47be2a77d0 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sun, 19 Nov 2023 22:52:10 +0200 Subject: [PATCH 2/2] Tweak comments --- release-plz.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-plz.toml b/release-plz.toml index d5fa424..cd812c8 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,5 +1,5 @@ +# release-plz configuration. https://release-plz.ieni.dev/docs/config [workspace] -# git-cliff configuration changelog_config = "cliff.toml" changelog_update = true git_tag_enable = true