Skip to content

Commit 08d417d

Browse files
committed
ci: update
1 parent dabc78f commit 08d417d

File tree

4 files changed

+48
-64
lines changed

4 files changed

+48
-64
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,26 @@ name: Deploy Docs
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76
workflow_dispatch: {}
87

98
jobs:
109
deploy:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v3
14-
15-
- name: Setup Node
13+
- name: Set node
1614
uses: actions/setup-node@v3
1715
with:
18-
node-version: 16
19-
20-
- name: Setup pnpm
21-
uses: pnpm/action-setup@v2
22-
with:
23-
version: latest
16+
node-version: 16.x
2417

25-
- name: Cache ~/.pnpm-store
26-
uses: actions/cache@v3
27-
env:
28-
cache-name: cache-pnpm-store
29-
with:
30-
path: ~/.pnpm-store
31-
key: ${{ runner.os }}-docs-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
32-
restore-keys: |
33-
${{ runner.os }}-docs-${{ env.cache-name }}-
34-
${{ runner.os }}-docs-
35-
${{ runner.os }}-
18+
- name: Setup
19+
run: npm i -g @antfu/ni
3620

37-
- name: Install Dependencies
38-
run: pnpm install
21+
- name: Install
22+
run: nci
3923

40-
- name: Build
24+
- name: Build Docs
4125
run: pnpm run docs:build
4226

4327
- name: Deploy

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v**'
6+
- 'v*'
77

88
jobs:
99
release:
@@ -13,11 +13,11 @@ jobs:
1313
with:
1414
fetch-depth: 0
1515

16-
- uses: actions/setup-node@v3
16+
- name: Set node
17+
uses: actions/setup-node@v3
1718
with:
18-
node-version: '16'
19-
registry-url: https://registry.npmjs.org/
19+
node-version: 16
2020

21-
- run: npx conventional-github-releaser -p angular
21+
- run: npx changelogithub
2222
env:
23-
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/unit-test.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,55 @@ name: Unit Test
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76
pull_request:
87
branches: [main]
98

109
jobs:
11-
unit_test:
12-
name: Unit Test (Node ${{ matrix.node-version }})
10+
lint:
1311
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16.x
18+
19+
- name: Setup
20+
run: npm i -g @antfu/ni
21+
22+
- name: Install
23+
run: nci
24+
25+
- name: Lint
26+
run: nr lint
27+
28+
unit_test:
29+
runs-on: ${{ matrix.os }}
1430

1531
strategy:
16-
fail-fast: false
1732
matrix:
18-
node-version: ['14.19', 'lts/*', '18']
33+
os: [ubuntu-latest]
34+
node: [14.19.0, 16.x, 18]
35+
fail-fast: false
1936

2037
steps:
2138
- uses: actions/checkout@v3
22-
with:
23-
fetch-depth: 0
24-
25-
- name: Setup node
39+
- name: Set node ${{ matrix.node }}
2640
uses: actions/setup-node@v3
2741
with:
28-
node-version: ${{ matrix.node-version }}
42+
node-version: ${{ matrix.node }}
2943

30-
- name: Cache ~/.pnpm-store
31-
uses: actions/cache@v3
32-
env:
33-
cache-name: cache-pnpm-store
34-
with:
35-
path: ~/.pnpm-store
36-
key: ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-
39-
${{ runner.os }}-${{ matrix.node-version }}-test-
40-
${{ runner.os }}-
41-
42-
- name: Setup pnpm
43-
uses: pnpm/action-setup@v2
44-
with:
45-
version: latest
44+
- name: Setup
45+
run: npm i -g @antfu/ni
46+
47+
- name: Install
48+
run: nci
4649

47-
- name: Install dependencies
48-
run: pnpm i --frozen-lockfile
49-
- name: Lint
50-
run: pnpm lint
5150
- name: Build
52-
run: pnpm build
51+
run: nr build
52+
5353
- name: Test
54-
run: pnpm test run tests/request.test.ts
54+
run: nr test tests/request.test.ts
5555
env:
5656
NODE_OPTIONS: --experimental-abortcontroller

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"lint:fix": "npm run lint -- --fix",
5555
"test": "vitest",
5656
"test:deno": "cd tests/deno && deno run --allow-net --import-map=import_map.json --allow-env index.ts",
57-
"release": "bumpp --commit --push --tag && npm publish",
57+
"release": "bumpp && npm publish",
5858
"prepublishOnly": "npm run build"
5959
},
6060
"dependencies": {

0 commit comments

Comments
 (0)