Skip to content

Commit 57d6187

Browse files
committed
chore: update GitHub workflows to use actions/checkout@v6 and actions/setup-node@v6 with improved caching and versioning
1 parent c0731d6 commit 57d6187

4 files changed

Lines changed: 47 additions & 9 deletions

File tree

.github/workflows/cd.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ jobs:
1414
name: Deploy Quickmock
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version-file: '.nvmrc'
23+
cache: 'npm'
1824

1925
- name: Install
2026
run: npm ci

.github/workflows/ci.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout repository
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@v6
1111

12-
- name: Use Node.js 24
13-
uses: actions/setup-node@v4
12+
- name: Use Node.js
13+
uses: actions/setup-node@v6
1414
with:
15-
node-version: '24'
15+
node-version-file: '.nvmrc'
1616
cache: 'npm'
1717

1818
- name: Install dependencies
@@ -34,12 +34,12 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v6
3838

39-
- name: Use Node.js 24
40-
uses: actions/setup-node@v4
39+
- name: Use Node.js
40+
uses: actions/setup-node@v6
4141
with:
42-
node-version: '24'
42+
node-version-file: '.nvmrc'
4343
cache: 'npm'
4444

4545
- name: Install dependencies
@@ -52,3 +52,29 @@ jobs:
5252

5353
- name: Run E2E tests
5454
run: npm run ci:e2e
55+
56+
changeset-check:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v6
61+
with:
62+
fetch-depth: 0
63+
64+
- name: Check for changeset
65+
run: |
66+
BASE=${{ github.event.pull_request.base.sha }}
67+
HEAD=${{ github.event.pull_request.head.sha }}
68+
69+
PACKAGES_CHANGED=$(git diff --name-only "$BASE" "$HEAD" -- packages/ | head -1)
70+
71+
if [ -n "$PACKAGES_CHANGED" ]; then
72+
CHANGESET_ADDED=$(git diff --name-only "$BASE" "$HEAD" -- '.changeset/*.md' | head -1)
73+
if [ -z "$CHANGESET_ADDED" ]; then
74+
echo "::error::This PR modifies packages/ but has no changeset. Run 'node --run changeset' to add one."
75+
exit 1
76+
fi
77+
echo "Changeset found for package changes."
78+
else
79+
echo "No package changes detected, skipping changeset check."
80+
fi

.github/workflows/pkg-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Package Publish
33
on:
44
push:
55
branches: [main]
6+
paths:
7+
- 'packages/**'
8+
- '.changeset/**'
69

710
concurrency: ${{ github.workflow }}-${{ github.ref }}
811

.github/workflows/pkg-version.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Package Versioning
33
on:
44
push:
55
branches: [dev]
6+
paths:
7+
- 'packages/**'
8+
- '.changeset/**'
69

710
concurrency: ${{ github.workflow }}-${{ github.ref }}
811

0 commit comments

Comments
 (0)