diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..5190e86 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,52 @@ +# release-please.yml — automated Conventional-Commits release PR generator. +# +# What this workflow does: +# On every push to main, googleapis/release-please-action reads the +# commit history since the last release tag (per package, scoped by +# release-please-config.json's `packages` map) and either: +# - opens a new "chore(main): release " PR, or +# - updates the existing release PR with the latest changelog + +# version bump derived from Conventional Commit messages. +# +# When a maintainer merges that PR, the action tags the merge commit +# with vX.Y.Z (framework) and/or ayama-vX.Y.Z (ayama). The existing +# release.yml / release-ayama.yml workflows fire on those tags and +# build/publish the GitHub Release as before. +# +# What this workflow does NOT do: +# - It does NOT push code. The only artifact is a draft PR + tag. +# - It does NOT bypass review. The release-PR still needs a click to +# merge. +# - It does NOT make calls to any external (Google) service. Everything +# runs in this repo's GitHub Actions runner against the GitHub API. +# +# Cost: open-source on Apache 2.0, free for public repos (unlimited +# Actions minutes). For private repos the cost is GitHub Actions runner +# minutes only — release-please completes in <30 s per run. + +name: release-please + +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + +# Only one release-please run at a time per branch — otherwise concurrent +# pushes can race on the release-PR head and one of them wins silently. +concurrency: + group: release-please-${{ github.ref }} + cancel-in-progress: false # let in-flight finish; queue subsequent + +jobs: + release-please: + name: release-please + runs-on: ubuntu-24.04 + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..e20907b --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,4 @@ +{ + ".": "1.0.3", + "apps/ayama": "0.1.3" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..a4aa2e0 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + + "release-type": "simple", + "include-v-in-tag": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "draft": false, + "prerelease": false, + + "_packages_doc": [ + "Two release trains in this monorepo:", + " - phyriad framework → tag prefix 'v' (matches release.yml on push.tags v*.*.*)", + " - ayama showcase app → tag prefix 'ayama-v' (matches release-ayama.yml on push.tags ayama-v*.*.*)", + "", + "Path scoping: changes under apps/ayama/** only bump the ayama package.", + "Changes anywhere else (framework/, bench/, docs/, examples/, scripts/, root)", + "only bump phyriad. Both can release independently; the existing per-tag", + "release workflows (release.yml + release-ayama.yml) fire as before.", + "", + "Conventional Commit rules in effect:", + " feat: → minor bump", + " fix: → patch bump", + " feat!: / BREAKING CHANGE: → major bump (post-1.0; while pre-1.0", + " 'bump-minor-pre-major' redirects", + " it to a minor bump)", + " chore / ci / docs / refactor / test / style / build → no bump" + ], + + "packages": { + ".": { + "component": "phyriad", + "package-name": "phyriad", + "include-component-in-tag": false, + "changelog-path": "CHANGELOG.md", + "release-type": "simple", + "exclude-paths": [ + "apps/ayama" + ], + "extra-files": [] + }, + "apps/ayama": { + "component": "ayama", + "package-name": "ayama", + "include-component-in-tag": true, + "changelog-path": "CHANGELOG.md", + "release-type": "simple", + "extra-files": [] + } + } +}