Skip to content

Commit 0a70e3b

Browse files
committed
update CI and add build job
1 parent 7ae7cfd commit 0a70e3b

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,20 @@ jobs:
44
lint:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Checkout repo
8-
uses: actions/checkout@v2
9-
10-
- name: Install Node
11-
uses: actions/setup-node@v2
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-node@v4
129
with:
13-
node-version: 18
10+
node-version: 20
1411
cache: 'npm'
15-
registry-url: 'https://registry.npmjs.org'
16-
17-
- name: Node version
18-
run: node -v
19-
20-
- name: Npm version
21-
run: npm -v
22-
23-
- name: Set version in env
24-
run: |
25-
echo "node-version=$(node -v)" >> $GITHUB_ENV
26-
echo "npm-version=$(npm -v)" >> $GITHUB_ENV
27-
28-
- name: Cache node modules
29-
uses: actions/cache@v2
30-
env:
31-
cache-name: cache-node-modules
12+
- run: npm ci
13+
- run: npm run lint
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
3219
with:
33-
path: '**/node_modules'
34-
key: ${{ runner.os }}-${{ env.cache-name }}-node${{ env.node-version }}-npm${{ env.npm-version }}-${{ hashFiles('**/package-lock.json') }}
35-
restore-keys: |
36-
${{ runner.os }}-${{ env.cache-name }}-node${{ env.node-version }}-npm${{ env.npm-version }}-
37-
38-
- name: Install dependencies
39-
env:
40-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
run: npm install
42-
43-
- name: Lint
44-
run: npm run lint
20+
node-version: 20
21+
cache: 'npm'
22+
- run: npm ci
23+
- run: npm run build

0 commit comments

Comments
 (0)