Skip to content

Commit ea4b9a3

Browse files
committed
ci: add check-dist workflow, engines field, .nvmrc, mark dist as generated; align checkout to v5
1 parent 672c8fb commit ea4b9a3

File tree

5 files changed

+37
-1
lines changed

5 files changed

+37
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/* -diff linguist-generated

.github/workflows/check-dist.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check dist
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
check-dist:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20'
17+
cache: 'npm'
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Build action
23+
run: npm run build
24+
25+
- name: Ensure dist is up to date
26+
run: |
27+
if ! git diff --quiet -- dist; then
28+
echo "dist/ is not up to date. Run 'npm run build' and commit the changes."
29+
git --no-pager diff -- dist | head -n 200 || true
30+
exit 1
31+
fi

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'rc')
7171
steps:
7272
- name: Checkout
73-
uses: actions/checkout@v4
73+
uses: actions/checkout@v5
7474
with:
7575
fetch-depth: 0
7676

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.1.2",
44
"description": "GitHub Action for running svelte-check with problem matcher",
55
"main": "dist/index.js",
6+
"engines": {
7+
"node": ">=20 <21"
8+
},
69
"scripts": {
710
"build": "rm -rf lib dist && tsc --outDir lib && ncc build lib/src/index.js -o dist && cp .github/svelte-check-matcher.json dist/",
811
"dev": "tsc --watch",

0 commit comments

Comments
 (0)