Skip to content

Commit

Permalink
Check for changesets separately (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericanderson authored Apr 24, 2024
1 parent 97f627e commit 82e7394
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,37 @@ on:
types: [opened, synchronize, reopened]

jobs:
changesets:
name: Check for changesets
if: ${{ github.event_name == 'pull_request' }}
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 8.7.4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Check for changesets
run: |
git fetch origin main:main
git checkout ${GITHUB_HEAD_REF}
pnpm exec changeset status --since=main
build:
name: Build and Test
timeout-minutes: 15
Expand All @@ -26,7 +57,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 2

- uses: pnpm/action-setup@v3
with:
Expand Down Expand Up @@ -54,10 +85,3 @@ jobs:
- name: Verify nothing added
run: u="$(git ls-files --others --exclude-standard)" && test -z "$u"

- name: Check for changesets
if: ${{ github.event_name == 'pull_request' }}
run: |
git fetch origin main:main
git checkout ${GITHUB_HEAD_REF}
pnpm exec changeset status --since=main

0 comments on commit 82e7394

Please sign in to comment.