From 911f3ce260440f50802fb609bea1637978803c82 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh <26975142+ZohebShaikh@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:35:03 +0000 Subject: [PATCH] ci: Add release please --- .github/workflows/_release_please.yml | 24 ++++++++++++++++++++++++ .github/workflows/ci.yml | 9 +++++++++ .release-please-manifest.json | 3 +++ release-please-config.json | 23 +++++++++++++++++++++++ 4 files changed, 59 insertions(+) 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/workflows/_release_please.yml b/.github/workflows/_release_please.yml new file mode 100644 index 000000000..7044068ce --- /dev/null +++ b/.github/workflows/_release_please.yml @@ -0,0 +1,24 @@ +name: Release Please + +on: + workflow_call: + secrets: + release_please_token: + required: true + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - name: Create GitHub App Token + id: app-token + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + with: + app-id: 1077859 # dls-release-please[bot] + private-key: ${{ secrets.release_please_token }} + + - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + with: + token: ${{ steps.app-token.outputs.token }} + manifest-file: .release-please-manifest.json + config-file: release-please-config.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8da5185b5..7a0750963 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,3 +74,12 @@ jobs: uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/release.yml@v0.28.0 permissions: contents: write # create the Release + attach assets + + release_please: + if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') + uses: ./.github/workflows/_release_please.yml + secrets: + release_please_token: ${{ secrets.RELEASE_PLEASE_CLIENT_SECRET }} + permissions: + contents: write + pull-requests: write diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..e9e21f782 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.22.0" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..0b7456896 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "python", + "include-v-in-tag": false, + "include-component-in-tag": false, + "packages": { + ".": { + "package-name": "blueapi", + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "perf", "section": "Performance Improvements" }, + { "type": "depr", "section": "Deprecations" }, + { "type": "revert", "section": "Reverts" }, + { "type": "docs", "section": "Documentation" }, + { "type": "refactor", "section": "Code Refactoring" }, + { "type": "test", "section": "Tests" }, + { "type": "ci", "section": "CI" }, + { "type": "chore", "section": "Miscellaneous" } + ] + } + } +}