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
17 changes: 11 additions & 6 deletions .github/workflows/pr-title-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: Lint PR title
# docs/CONTRIBUTING.md. Since PRs are squash-merged with the PR title as the
# squash commit's title (see the "squash merge" note in docs/CONTRIBUTING.md),
# this is what actually lands in main's history -- and what
# scripts/cut-release.sh's breaking-change scan reads.
# .github/workflows/release-please.yml reads to determine version bumps and
# CHANGELOG.md entries (see docs/RELEASING.md).
#
# pull_request_target (not pull_request) so this also runs for PRs from
# forks: it only reads the PR title from the base repo's workflow config, it
Expand Down Expand Up @@ -32,15 +33,19 @@ jobs:

# Derives the enhancement/bug/breaking-change/documentation label from the
# PR title so it doesn't have to be kept in sync by hand -- these feed
# .github/release.yml's auto-generated release-note categories. Only ever
# adds a label, never removes one, so a title edit won't strip a label a
# human applied for an unrelated reason (e.g. good first issue).
# .github/release.yml's categories, the fallback used only when notes are
# generated by hand (gh release create --generate-notes); the primary
# changelog is release-please.yml's CHANGELOG.md, which reads the PR title
# directly rather than this label. Only ever adds a label, never removes
# one, so a title edit won't strip a label a human applied for an
# unrelated reason (e.g. good first issue).
#
# Note: "!" here means the PR breaks osmdiffs' OUTPUT SCHEMA
# (conflated.parquet), not that it breaks some public API -- see
# docs/CONTRIBUTING.md and docs/RELEASING.md's "Choosing the version
# number". It's a hint for scripts/cut-release.sh, not a substitute for the
# human judgment call that document asks for.
# number". release-please.yml is what actually turns this into a version
# bump; this label isn't a substitute for the human judgment call
# RELEASING.md asks for when merging its release PR.
#
# No third-party action for this: the one commonly suggested for it
# (bcoe/conventional-release-labels) only detects breaking changes via a
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: release-please

# Maintains a continuously-updated "release PR" (version bump + CHANGELOG.md
# entries, driven by Conventional-Commits PR titles -- see
# docs/CONTRIBUTING.md#pr-titles-conventional-commits) and, once that PR is
# merged, tags the resulting commit and publishes the GitHub Release. See
# docs/RELEASING.md for the full process this fits into, including why "!"
# means OUTPUT-SCHEMA-breaking here, not API-breaking.
#
# Runs as the account-wide "brawer-release-bot" GitHub App (already used the
# same way by brawer/osmviews, brawer/osmviews-rs and brawer/osmviews-py)
# rather than the built-in GITHUB_TOKEN: workflow runs caused by the default
# GITHUB_TOKEN don't trigger other workflow runs (GitHub does this
# deliberately, to prevent recursive-workflow loops -- see
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#triggering-a-workflow-from-a-workflow).
# Without the App identity, the release PR this action opens would never get
# test.yml's "Execute unit and integration tests" run against it (that
# workflow triggers on `pull_request`), so it could never clear the
# required-status-check the branch ruleset demands, and could never be
# merged. See "Setting up the release-please App" in docs/RELEASING.md for
# how this was installed on this repo.
on:
push:
branches: [main]
workflow_dispatch: # kick a run by hand if a push-triggered one was skipped

permissions: {}

jobs:
release-please:
name: Open/update the release PR, or publish a release
runs-on: ubuntu-latest
permissions: {}
# Skip (rather than fail every push to main) until the App is installed
# on this repo and its client ID is set -- see docs/RELEASING.md.
if: vars.RELEASE_PLEASE_APP_CLIENT_ID != ''
steps:
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
client-id: ${{ vars.RELEASE_PLEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_APP_PRIVATE_KEY }}
permission-contents: write # tag + GitHub release
permission-pull-requests: write # open and update the release PR

- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ steps.app-token.outputs.token }}
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.8.3"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

Maintained automatically by
[release-please](https://github.com/googleapis/release-please) from
Conventional-Commits PR titles (see
[`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md#pr-titles-conventional-commits)
and [`docs/RELEASING.md`](docs/RELEASING.md)) — don't hand-edit entries for
released versions.

This file starts from the first release cut after release-please was
adopted. For earlier releases (up to and including
[v0.8.3](https://github.com/brawer/osmdiffs/releases/tag/v0.8.3)), see the
[GitHub Releases page](https://github.com/brawer/osmdiffs/releases).
5 changes: 3 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ breaks the output schema*, per the rules in
— not that some function signature changed. A `refactor!:` or `chore!:`
that happens to rename a Parquet column is exactly as `!` as a `feat!:`
that removes one; a `feat:` CLI flag that doesn’t touch the schema isn’t
`!` at all. `cut-release.sh` reads these markers to *suggest* a version
floor, but the actual version is still your call, per `RELEASING.md`.
`!` at all. `release-please` reads these markers to determine the next
version's bump — see “How release-please's version bumps map to this
rule” in `RELEASING.md` for exactly how.

## Where to go next

Expand Down
Loading
Loading