Skip to content

Commit 3541e1e

Browse files
committed
ci: use shared workflow
1 parent 2c38bbf commit 3541e1e

5 files changed

Lines changed: 21 additions & 190 deletions

File tree

.github/workflows/autofix-ci.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,13 @@
11
name: autofix.ci
2+
23
on:
34
push:
4-
branches:
5-
- main
5+
branches: [main]
66

77
pull_request: {}
88

9-
permissions:
10-
contents: read
11-
129
jobs:
1310
autofix:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v3
17-
18-
- name: Setup PNPM
19-
run: corepack enable
20-
21-
- name: Setup node
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: 24.x
25-
cache: pnpm
26-
27-
- name: Setup
28-
run: npm i -g @antfu/ni
29-
30-
- name: Install
31-
run: ni --no-frozen-lockfile
32-
33-
- name: Lint and fix
34-
run: nr lint:fix
35-
36-
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
37-
with:
38-
commit-message: "chore: apply automatic fixes"
11+
uses: so1ve/workflows/.github/workflows/autofix-ci.yml@v1
12+
permissions:
13+
contents: read

.github/workflows/ci.yml

Lines changed: 7 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,13 @@
1-
name: CI
1+
name: Conventional CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
5+
branches: [main]
86
pull_request:
9-
branches:
10-
- main
7+
branches: [main]
118

129
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v3
17-
18-
- name: Setup PNPM
19-
run: corepack enable
20-
21-
- name: Set node
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: 24.x
25-
cache: pnpm
26-
27-
- name: Setup
28-
run: npm i -g @antfu/ni
29-
30-
- name: Install
31-
run: nci
32-
33-
- name: Lint
34-
run: nr lint
35-
36-
typecheck:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v3
40-
41-
- name: Setup PNPM
42-
run: corepack enable
43-
44-
- name: Set node
45-
uses: actions/setup-node@v3
46-
with:
47-
node-version: 24.x
48-
cache: pnpm
49-
50-
- name: Setup
51-
run: npm i -g @antfu/ni
52-
53-
- name: Install
54-
run: nci
55-
56-
- name: Build
57-
run: nr build
58-
59-
- name: Typecheck
60-
run: nr typecheck
61-
62-
test:
63-
runs-on: ${{ matrix.os }}
64-
65-
strategy:
66-
matrix:
67-
node: [22.x, 24.x]
68-
os: [ubuntu-latest, windows-latest, macos-latest]
69-
fail-fast: false
70-
71-
steps:
72-
- uses: actions/checkout@v3
73-
74-
- name: Setup PNPM
75-
run: corepack enable
76-
77-
- name: Set node version to ${{ matrix.node }}
78-
uses: actions/setup-node@v3
79-
with:
80-
node-version: ${{ matrix.node }}
81-
cache: pnpm
82-
83-
- name: Setup
84-
run: npm i -g @antfu/ni
85-
86-
- name: Install
87-
run: nci
88-
89-
- name: Build
90-
run: nr build
91-
92-
- name: Test
93-
run: nr test:all
10+
conventional-ci:
11+
uses: so1ve/workflows/.github/workflows/conventional-ci.yml@v1
12+
with:
13+
test: pnpm run test:all

.github/workflows/lock.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@ on:
55
- cron: "0 0 * * *"
66
workflow_dispatch: {}
77

8-
permissions:
9-
issues: write
10-
pull-requests: write
11-
12-
concurrency:
13-
group: lock
14-
158
jobs:
16-
action:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: dessant/lock-threads@v4
20-
with:
21-
github-token: ${{ secrets.GITHUB_TOKEN }}
22-
issue-inactive-days: "14"
23-
issue-comment: |
24-
This issue has been locked since it has been closed for more than 14 days.
25-
26-
If you have found a concrete bug or regression related to it, please open a new [issue](./new/choose). If you have any other comments you should create a new [discussion](../discussions/new/choose).
27-
process-only: issues
9+
lock:
10+
uses: so1ve/workflows/.github/workflows/lock.yml@v1

.github/workflows/pkg-pr-new.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11
name: Publish Any Commit
2+
23
on: [push, pull_request]
34

45
permissions: {}
56

67
jobs:
7-
build:
8-
runs-on: ubuntu-latest
9-
10-
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v4
13-
14-
- run: corepack enable
15-
16-
- uses: actions/setup-node@v4
17-
with:
18-
node-version: 20
19-
cache: pnpm
20-
21-
- name: Install dependencies
22-
run: pnpm install
23-
24-
- name: Build
25-
run: pnpm build
26-
27-
- run: pnpm dlx pkg-pr-new publish "./packages/*"
8+
release-commit:
9+
uses: so1ve/workflows/.github/workflows/release-commit.yml@v1
10+
with:
11+
packages: "./packages/*"

.github/workflows/release.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,9 @@ on:
66
- "v*"
77

88
permissions:
9-
id-token: write
109
contents: write
10+
id-token: write
1111

1212
jobs:
1313
release:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
19-
20-
- name: Setup PNPM
21-
run: corepack enable
22-
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 24.x
26-
cache: pnpm
27-
28-
- name: Update npm
29-
run: npm install -g npm@latest
30-
31-
- name: Setup
32-
run: npm i -g @antfu/ni
33-
34-
- name: Install
35-
run: nci
36-
37-
- name: Build
38-
run: nr build
39-
40-
- name: Publish
41-
run: pnpm -r publish --access public --no-git-checks
42-
43-
- run: nlx changelogithub
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
uses: so1ve/workflows/.github/workflows/release.yml@v1

0 commit comments

Comments
 (0)