diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 22c514f..d9523eb 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -9,6 +9,10 @@ on: push: branches: - main + pull_request: + paths: + - ".github/workflows/release-please.yml" + - "release-please-config.json" workflow_dispatch: inputs: tag: @@ -18,6 +22,7 @@ on: jobs: release-please: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest permissions: contents: write @@ -27,7 +32,7 @@ jobs: tag_name: ${{ inputs.tag || steps.release.outputs.tag_name }} steps: # Only run the bot on push events; skip it for manual re-publish triggers. - - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4 + - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5 id: release if: github.event_name == 'push' with: @@ -133,3 +138,17 @@ jobs: uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 with: print-hash: true + + validate-action: + name: Validate release-please action (read-only) + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + steps: + - name: Start the same release action without creating releases or pull requests + uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5 + with: + skip-github-release: true + skip-github-pull-request: true diff --git a/AGENTS.md b/AGENTS.md index 5fa6815..e9496d2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,7 +51,7 @@ git push # This bypasses PR review! All commits must follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: -- `feat:` - New feature (bumps minor version pre-1.0.0) +- `feat:` - New feature (bumps the patch version while the project is pre-1.0.0) - `fix:` - Bug fix (bumps patch version) - `docs:` - Documentation changes - `chore:` - Maintenance tasks @@ -101,11 +101,13 @@ This repository uses **release-please** for automated releases. We're currently pre-1.0.0, which uses special semver rules: -- `fix:` commits → **minor** version bump (0.2.0 → 0.3.0) -- `feat:` commits → **minor** version bump (0.2.0 → 0.3.0) -- `BREAKING CHANGE:` → **major** version bump (0.2.0 → 1.0.0) +- `fix:` commits → **patch** version bump (0.2.0 → 0.2.1) +- `feat:` commits → **patch** version bump (0.2.0 → 0.2.1) +- Breaking commits (`type!:` or a `BREAKING CHANGE:` footer) → **minor** version bump (0.2.0 → 0.3.0) -This is configured via `bump-patch-for-minor-pre-major: true` in `release-please-config.json`. +This is configured by both `bump-minor-pre-major: true` and `bump-patch-for-minor-pre-major: true` +in `release-please-config.json`. See the [release-please versioning options](https://github.com/googleapis/release-please/blob/main/docs/cli.md#creatingupdating-release-prs) +for their behavior before 1.0.0. ### Release Configuration Files