Skip to content
Draft
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
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release Please

on:
push:
branches: [master]
workflow_dispatch: {}

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# A pull request opened with GITHUB_TOKEN does not trigger workflows, so
# the release PR is opened as the app instead.
- name: Mint app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}

- name: Run release-please
id: release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5
with:
token: ${{ steps.app-token.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

- name: Summarise
env:
RELEASE_CREATED: ${{ steps.release.outputs.release_created }}
TAG_NAME: ${{ steps.release.outputs.tag_name }}
PRS_CREATED: ${{ steps.release.outputs.prs_created }}
run: |
if [ "$RELEASE_CREATED" = "true" ]; then
echo "Released $TAG_NAME" >> "$GITHUB_STEP_SUMMARY"
elif [ "$PRS_CREATED" = "true" ]; then
echo "Release PR created/updated" >> "$GITHUB_STEP_SUMMARY"
else
echo "Nothing to release" >> "$GITHUB_STEP_SUMMARY"
fi
37 changes: 37 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Semantic PR

on:
pull_request_target:
types: [opened, edited, synchronize, reopened]

permissions:
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
title:
name: Conventional PR title
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
# Squash-merge uses the PR title as the commit message, so linting the
# title is what keeps master's history conventional for release-please.
# The scope is the crate, e.g. `feat(store): ...`.
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
test
refactor
perf
build
ci
chore
revert
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.45.0"
}
11 changes: 7 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,14 @@ Blockchain → Chain Adapter → Block Stream → Trigger Processing → Runtime

### Commit Convention

Use format: `{crate-name}: {description}`
Use [Conventional Commits](https://www.conventionalcommits.org) with the crate as scope: `{type}({crate-name}): {description}`

- Single crate: `store: Support 'Or' filters`
- Multiple crates: `core, graphql: Add event source to store`
- All crates: `all: {description}`
- Single crate: `feat(store): Support 'Or' filters`
- Multiple crates: `feat(core,graphql): Add event source to store`
- All crates: `refactor(all): {description}`
- Types: `feat`, `fix`, `docs`, `test`, `refactor`, `perf`, `build`, `ci`, `chore`, `revert`; mark breaking changes with `!` (`feat(store)!: ...`)

release-please reads every commit on master, so each one must follow this format. The Semantic PR workflow checks PR titles, which become the commit message when a PR is squash-merged. release-please derives versions and the changelog from these commits: while the version is below 1.0, `feat` and breaking changes bump the minor version, `fix` and `perf` bump the patch version.

### Git Workflow

Expand Down
18 changes: 12 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ detailed instructions about how to run the sharded integrations tests.

## Commit messages and pull requests

We use the following format for commit messages:
`{crate-name}: {Brief description of changes}`, for example: `store: Support 'Or' filters`.

If multiple crates are being changed list them all like this: `core,
graphql: Add event source to store` If all (or most) crates are affected
by the commit, start the message with `all: `.
We use [Conventional Commits](https://www.conventionalcommits.org) with
the crate as scope: `{type}({crate-name}): {Brief description of changes}`,
for example: `feat(store): Support 'Or' filters`. The types are `feat`,
`fix`, `docs`, `test`, `refactor`, `perf`, `build`, `ci`, `chore` and
`revert`; mark breaking changes with `!` (`feat(store)!: ...`).

If multiple crates are being changed list them all like this:
`feat(core,graphql): Add event source to store`. If all (or most) crates
are affected by the commit, use the scope `all`.

release-please derives versions and the changelog from the commits on
master, so every commit that lands there must follow this format.

The body of the message can be terse, with just enough information to
explain what the commit does overall. In a lot of cases, more extensive
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",
"bootstrap-sha": "8e3debd675309d96eb987bf90f053f378bc917bf",
"last-release-sha": "8e3debd675309d96eb987bf90f053f378bc917bf",
"bump-minor-pre-major": true,
"include-component-in-tag": false,
"packages": {
".": {
"release-type": "simple",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "toml",
"path": "Cargo.toml",
"jsonpath": "$.workspace.package.version"
},
{
"type": "toml",
"path": "Cargo.lock",
"jsonpath": "$.package[?(!@.source)].version"
}
]
}
}
}
Loading