Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/actions/bump-pre-commit-rev/action.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/prepare-release.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/publish-release.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release Please
on:
push:
branches: [main]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
steps:
# GITHUB_TOKEN-created pull requests do not trigger required CI workflows.
- uses: googleapis/release-please-action@v5
id: release
with:
token: ${{ secrets.RELEASE_TOKEN }}

publish:
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ needs.release.outputs.tag_name }}
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: false
- name: Publish gem
run: |
gem build baseline.gemspec
gem push rubykatzen-baseline-*.gem
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
- name: Update floating tags
env:
TAG_NAME: ${{ needs.release.outputs.tag_name }}
MAJOR: ${{ needs.release.outputs.major }}
MINOR: ${{ needs.release.outputs.minor }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
target=$(git rev-list -n 1 "$TAG_NAME")
for tag in "v$MAJOR" "v$MAJOR.$MINOR"; do
git tag --force --annotate "$tag" "$target" --message "$tag"
git push origin "refs/tags/$tag" --force
done
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/rubykatzen/baseline
rev: v0.9.0
rev: v0.9.0 # x-release-please-version
hooks:
- id: yamllint
- id: pymarkdown
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/rubykatzen/baseline
rev: v0.9.0
rev: v0.9.0 # x-release-please-version
hooks:
- id: yamllint
- id: pymarkdown
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.9.0"
}
38 changes: 9 additions & 29 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ tools to already be installed in the developer environment.
- `.github/workflows/embedder-shared.yml` — reusable workflow exported for required content validation
- `.github/workflows/commit.yml` — baseline caller for its Conventional Commit pull request title check
- `.github/workflows/lint.yml` — baseline self-lint (uses local `./` references, not `@vX`)
- `.github/workflows/prepare-release.yml` — dispatch workflow: calls `rubykatzen/releaser` to prepare `release/vX.Y.Z`
- `.github/workflows/publish-release.yml` — publishes merged `release/*` PRs via `rubykatzen/releaser`
- `.github/workflows/release-please.yml` — maintains the release PR and publishes merged releases
- `.github/workflows/notify-telegram-unreleased.yml` — baseline's own caller (delegates to `rubykatzen/releaser`)
- `.pre-commit-hooks.yaml` — hook definitions for pre-commit
- `.pre-commit-config.yaml.example` — example for consuming repos (all hooks, prune as needed)
Expand Down Expand Up @@ -120,34 +119,15 @@ validated, not a pinned release.

## Cutting Releases

Use the [rubykatzen/releaser](https://github.com/rubykatzen/releaser) CLI.
Run from inside this repository:
Release Please maintains a release pull request from Conventional Commits on
`main`. Review the proposed version, changelog, and file updates, then merge the
pull request to release. The workflow creates the version tag and GitHub
Release, publishes the gem, and updates the floating major and minor tags.

```bash
releaser patch # or: releaser minor / releaser major
```

The CLI does the following automatically:

1. Fetches `origin/main` and finds the latest SemVer tag
2. Verifies CI is green on `origin/main`
3. Calculates the next version
4. Dispatches `.github/workflows/prepare-release.yml` with the computed version
and `base_sha`
5. Watches the workflow run
6. Opens a PR from `release/vX.Y.Z` → `main` and enables auto-merge

`.github/workflows/publish-release.yml` fires automatically once the PR merges
and creates the annotated tag and GitHub release.

To check readiness without triggering a release:

```bash
releaser status
releaser patch --dry-run
```

If the CLI is not installed: `brew tap rubykatzen/tap && brew install releaser`.
The workflow requires a fine-grained personal access token in the
`RELEASE_TOKEN` repository secret, limited to this repository with read
and write access to contents, issues, and pull requests. The token ensures
release pull requests trigger required CI.

## Linter Selection

Expand Down
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Changelog

## [Unreleased]

## [v0.9.0] - 2026-08-12

- chore(deps): bump rubocop-rails from 2.35.4 to 2.36.0 (#122)
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Include only the hooks relevant to your stack:
```yaml
repos:
- repo: https://github.com/rubykatzen/baseline
rev: v0.9.0
rev: v0.9.0 # x-release-please-version
hooks:
- id: yamllint
- id: pymarkdown
Expand Down Expand Up @@ -346,31 +346,16 @@ Bundler-resolved toolchain.

## Releases

Baseline releases are cut with the
[rubykatzen/releaser](https://github.com/rubykatzen/releaser) CLI. Run from
inside this repository:
Release Please maintains a release pull request from Conventional Commits on
`main`. Review its proposed version, changelog, and file updates, then merge the
pull request to release. The merge creates the version tag and GitHub Release,
publishes `rubykatzen-baseline` to RubyGems, and updates the floating major and
minor tags used by consumers.

```bash
releaser patch # or: releaser minor / releaser major
```

The CLI verifies that CI is green on `origin/main`, calculates the next version,
dispatches `prepare-release.yml`, watches it run, then opens a `release/vX.Y.Z`
PR and enables auto-merge. `publish-release.yml` fires automatically once the PR
merges and creates the tag and GitHub release.

Check release readiness without triggering anything:

```bash
releaser status
releaser patch --dry-run
```

Install the CLI:

```bash
brew tap rubykatzen/tap && brew install releaser
```
The release workflow uses the `RELEASE_TOKEN` repository secret so its
pull requests trigger required CI. Use a fine-grained personal access token
limited to this repository with read and write access to contents, issues, and
pull requests.

## Linters: defaults & overrides

Expand Down
25 changes: 25 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "ruby",
"include-component-in-tag": false,
"packages": {
".": {
"package-name": "rubykatzen-baseline",
"version-file": "lib/baseline/version.rb",
"extra-files": [
{
"type": "generic",
"path": ".pre-commit-config.yaml"
},
{
"type": "generic",
"path": ".pre-commit-config.yaml.example"
},
{
"type": "generic",
"path": "README.md"
}
]
}
}
}