name: Changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog:
name: unreleased-entry
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 with:
fetch-depth: 0
- name: Detect src/ or ui/ changes
id: filter
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d with:
filters: |
code:
- 'src/**'
- 'ui/**'
- name: Install pnpm
if: steps.filter.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-changelog')
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271
- name: Install Node.js
if: steps.filter.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-changelog')
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with:
node-version: 22
cache: pnpm
- name: Install dependencies
if: steps.filter.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-changelog')
run: pnpm install --frozen-lockfile
- name: Require a changeset when src/ or ui/ changed
if: steps.filter.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-changelog')
run: |
pnpm exec changeset status --since=origin/main || {
echo "::error::PR changes src/ or ui/ but no changeset was added. Run 'pnpm changeset', or apply the 'skip-changelog' label."
exit 1
}