From d48e3e0a9f1234af9848d154dff96cd22e08f8f6 Mon Sep 17 00:00:00 2001 From: JasterV <49537445+JasterV@users.noreply.github.com> Date: Fri, 28 Nov 2025 14:40:05 +0100 Subject: [PATCH] chore: add CD --- .github/dependabot.yml | 5 ++++ .github/workflows/cd.yml | 49 ++++++++++++++++++++++++++++++++++++++++ release-plz.toml | 6 +++++ 3 files changed, 60 insertions(+) create mode 100644 .github/workflows/cd.yml create mode 100644 release-plz.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e5e3518..039ac35 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,8 @@ updates: schedule: interval: "weekly" open-pull-requests-limit: 10 + - package-ecosystem: "github-actions" + directory: "/" + # Check for updates every Monday + schedule: + interval: "weekly" diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..8ed63f7 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,49 @@ +name: Release-plz +on: + push: + branches: + - main +jobs: + # Release unpublished packages. + release-plz-release: + name: Release-plz release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - &checkout + name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + - &install-rust + name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/release-plz.toml b/release-plz.toml new file mode 100644 index 0000000..91d7254 --- /dev/null +++ b/release-plz.toml @@ -0,0 +1,6 @@ +[workspace] +# set the path of all the crates to the changelog to the root of the repository +changelog_path = "./CHANGELOG.md" +pr_draft = true +pr_labels = ["release"] +pr_branch_prefix = "release-"