From 49f8e807055b8070e2f2132261933674486b0471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:14:26 +0200 Subject: [PATCH] ci: setup release-please for python (#926) --- .github/dependabot.yml | 10 +++++ .github/workflows/release-please.yml | 22 ++++++++++ .github/workflows/release-plz.yml | 3 +- .release-please-manifest.json | 3 ++ release-please-config.json | 62 ++++++++++++++++++++++++++++ release-plz.toml | 2 + 6 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 170902d17..2110a5043 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,7 +12,17 @@ updates: commit-message: # Use a conventional commit tag prefix: "chore(deps)" + - package-ecosystem: "pip" + directory: "/hugr-py/" # Location of package manifests + schedule: + interval: "weekly" + commit-message: + # Use a conventional commit tag + prefix: "chore(deps-py)" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + commit-message: + # Use a conventional commit tag + prefix: "ci(deps)" diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..0c9cac71e --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,22 @@ +# Automatic changelog and version bumping with release-please for python projects +name: Release-please 🐍 + +on: + workflow_dispatch: {} + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + name: Create release PR + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + target-branch: ${{ github.event.ref }} diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index 436bb2f4d..25a08b1d9 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -1,4 +1,5 @@ -name: Release-plz +# Automatic changelog, version bumping, and semver-checks with release-plz for rust projects +name: Release-plz 🦀 permissions: pull-requests: write diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..eee402d93 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + "quantinuum-hugr-py": "0.1.0a1" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..68527b964 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "include-component-in-tag": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "initial-version": "0.1.0", + "packages": { + "quantinuum-hugr-py": { + "release-type": "python", + "package-name": "hugr", + "draft": false, + "prerelease": false + } + }, + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styling", + "hidden": true + }, + { + "type": "chore", + "section": "Miscellaneous Chores", + "hidden": true + }, + { + "type": "refactor", + "section": "Code Refactoring", + "hidden": true + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ] +} diff --git a/release-plz.toml b/release-plz.toml index c6396384f..f6cfe39de 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,3 +1,5 @@ +# Automatic changelog generation for rust projects + [workspace] # Open the release PR as a draft pr_draft = true