Skip to content

fix: element output & author schema #30

fix: element output & author schema

fix: element output & author schema #30

# this workflow will run on every pr to make sure the project is following the guidelines
# after labeler, run other actions with strict permissions
name: Lint and Validate PR
on:
pull_request:
branches: ["*"]
merge_group:
jobs:
lint:
runs-on: ubuntu-latest
name: Run ESLint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm build
- run: pnpm lint
check-changeset:
runs-on: ubuntu-latest
name: Check Changeset
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Check and Validate Changes in /cli
run: |
git fetch origin main:main
changes=$(git diff --name-only main...${{ github.sha }} | grep '^cli/' || true)
if [[ -n "$changes" ]]; then
echo "Changes detected in /cli: $changes"
pnpm changeset status --since origin/main
exit_status=$?
if [[ $exit_status -eq 0 ]]; then
echo "Changeset validation succeeded."
else
echo "Changeset validation failed."
fi
else
echo "No changes detected in /cli"
fi
prettier:
runs-on: ubuntu-latest
name: Run Prettier
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm format:check
tsc:
runs-on: ubuntu-latest
name: Run Typechecker
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm typecheck