-
Notifications
You must be signed in to change notification settings - Fork 34
feat: release automation configs #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||
| name: release-please | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: [main] | ||||||||||
| workflow_dispatch: | ||||||||||
| inputs: | ||||||||||
| bump-type: | ||||||||||
| description: > | ||||||||||
| Version bump type. Select 'explicit' to supply an exact version via | ||||||||||
| the 'release-version' field below. Select 'auto' to let | ||||||||||
| conventional-commits determine the bump automatically. | ||||||||||
| required: false | ||||||||||
| type: choice | ||||||||||
| default: 'auto' | ||||||||||
| options: | ||||||||||
| - auto | ||||||||||
| - patch | ||||||||||
| - minor | ||||||||||
| - major | ||||||||||
| - explicit | ||||||||||
| release-version: | ||||||||||
| description: > | ||||||||||
| Explicit version to release (e.g. 1.2.3 or 1.4.0-beta.1). | ||||||||||
| required: false | ||||||||||
| type: string | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| release: | ||||||||||
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@main | ||||||||||
| with: | ||||||||||
| bump-type: ${{ inputs.bump-type || 'auto' }} | ||||||||||
| release-version: ${{ inputs.release-version || '' }} | ||||||||||
|
Comment on lines
+32
to
+33
|
||||||||||
| bump-type: ${{ inputs.bump-type || 'auto' }} | |
| release-version: ${{ inputs.release-version || '' }} | |
| bump-type: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['bump-type'] || 'auto' }} | |
| release-version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-version'] || '' }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "0.10.0" | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,103 @@ | ||||||||||||||||||||||||||||||||||
| # Release guide | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| This project uses [release-please](https://github.com/googleapis/release-please) via a | ||||||||||||||||||||||||||||||||||
| `workflow_dispatch`-triggered GitHub Actions workflow. This document explains how to cut | ||||||||||||||||||||||||||||||||||
| a release and what to watch out for. | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+5
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ## Versioning rules for this project | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| We are pre-1.0.0. Semver conventions are relaxed: | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| | Change type | Bump | Example | | ||||||||||||||||||||||||||||||||||
| |--- |--- |--- | | ||||||||||||||||||||||||||||||||||
| | Breaking change | **Minor** (`0.x.0`) | `0.10.0` → `0.11.0` | | ||||||||||||||||||||||||||||||||||
| | Everything else | **Patch** (`0.0.x`) | `0.10.0` → `0.10.1` | | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Major bumps (`1.0.0`) are reserved for a deliberate stable-API graduation decision — not for | ||||||||||||||||||||||||||||||||||
| routine breaking changes. | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ## Cutting a release | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| 1. Go to **Actions → release-please** and click **Run workflow**. | ||||||||||||||||||||||||||||||||||
| 2. Choose a bump type: | ||||||||||||||||||||||||||||||||||
| - `patch` — bugfixes, docs, small changes | ||||||||||||||||||||||||||||||||||
| - `minor` — breaking changes (see above) | ||||||||||||||||||||||||||||||||||
| - `explicit` — you specify the exact version string (e.g. `0.11.0` or `0.11.0-beta.1`) | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
+29
|
||||||||||||||||||||||||||||||||||
| - `patch` — bugfixes, docs, small changes | |
| - `minor` — breaking changes (see above) | |
| - `explicit` — you specify the exact version string (e.g. `0.11.0` or `0.11.0-beta.1`) | |
| - `auto` — let release-please infer the next version from Conventional Commit types; | |
| use this only when the previous tag was a normal release (no pre-release suffix) | |
| and there are no manually created tags since then. | |
| - `patch` — convenience option for a patch bump (`0.0.x`): bugfixes, docs, small | |
| changes that are not intentionally breaking. | |
| - `minor` — convenience option for a minor bump (`0.x.0`): use for breaking changes | |
| under the pre-1.0.0 rules described above. | |
| - `major` — convenience option for a major bump (`1.0.0`, `2.0.0`, …); in this | |
| project, use only for a deliberate stable-API graduation decision, not for routine | |
| breaking changes. | |
| - `explicit` — you specify the exact version string (e.g. `0.11.0` or | |
| `0.11.0-beta.1`); recommended when in doubt, and in all the situations listed in | |
| the **When to use `explicit`** section below. |
Copilot
AI
Apr 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Conventional Commits → changelog mapping example marks refactor as “(hidden)”, but release-please-config.json configures refactor as visible (hidden: false) under the “Changed” section. Align the example with the config (or adjust the config) so the generated changelog matches the documented expectations.
| refactor: extract auth helper → (hidden) | |
| refactor: extract auth helper → Changed |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |||||
|
|
||||||
|
|
||||||
| # Version of the OpenFGA Python SDK. | ||||||
| SDK_VERSION: Final[str] = "0.10.0" | ||||||
| SDK_VERSION: Final[str] = "0.10.0" # x-release-please-version | ||||||
|
|
||||||
| # User agent used in HTTP requests. | ||||||
| USER_AGENT: Final[str] = "openfga-sdk python/0.10.0" | ||||||
|
||||||
| USER_AGENT: Final[str] = "openfga-sdk python/0.10.0" | |
| USER_AGENT: Final[str] = f"openfga-sdk python/{SDK_VERSION}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
| "release-type": "python", | ||
| "packages": { | ||
| ".": { | ||
| "include-component-in-tag": false, | ||
| "changelog-path": "CHANGELOG.md", | ||
| "changelog-type": "default", | ||
| "bump-minor-pre-major": true, | ||
| "bump-patch-for-minor-pre-major": true, | ||
| "changelog-sections": [ | ||
| { "type": "feat", "section": "Added", "hidden": false }, | ||
| { "type": "fix", "section": "Fixed", "hidden": false }, | ||
| { "type": "perf", "section": "Changed", "hidden": false }, | ||
| { "type": "refactor", "section": "Changed", "hidden": false }, | ||
| { "type": "revert", "section": "Removed", "hidden": false }, | ||
| { "type": "docs", "section": "Documentation", "hidden": false }, | ||
| { "type": "test", "section": "Tests", "hidden": true }, | ||
| { "type": "ci", "section": "CI", "hidden": true }, | ||
| { "type": "chore", "section": "Miscellaneous", "hidden": true } | ||
| ], | ||
| "extra-files": [ | ||
| { "type": "toml", "path": "pyproject.toml", "jsonpath": "$.project.version" }, | ||
| { "type": "generic", "path": "openfga_sdk/constants.py" } | ||
| ] | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reusable workflow is referenced by branch (
openfga/sdk-generator/...@main). For release automation, pinning to an immutable ref (tag or commit SHA) helps avoid supply-chain risk and unexpected behavior changes whenmainmoves.