Skip to content

chore: add documentation site and release infrastructure #4

chore: add documentation site and release infrastructure

chore: add documentation site and release infrastructure #4

name: Changeset Check
on:
pull_request:
branches:
- dev
- main
jobs:
changeset-check:
name: Check for Changeset
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Check for Changesets
id: check
run: |
# Skip check for version bump PRs
if [[ "${{ github.head_ref }}" == *"version-packages"* ]]; then
echo "Skipping changeset check for version PR"
exit 0
fi
# Skip check for chore commits that don't need changesets
if [[ "${{ github.head_ref }}" == chore/* ]] || \
[[ "${{ github.head_ref }}" == docs/* ]] || \
[[ "${{ github.head_ref }}" == ci/* ]]; then
echo "Skipping changeset check for chore/docs/ci PR"
exit 0
fi
# Check if changesets exist
pnpm changeset status --since=origin/${{ github.base_ref }}
- name: Comment on PR
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '⚠️ **No changeset found**\n\nThis PR appears to contain changes that should have a changeset.\n\nPlease run `pnpm changeset` and commit the generated changeset file.\n\nIf this PR doesn\'t need a changeset (e.g., docs, tests, or internal changes), you can ignore this message.'
})