Skip to content

Commit ed51ed8

Browse files
committed
feat: update dependencies and ci scripts
1 parent 6a3748f commit ed51ed8

File tree

13 files changed

+4972
-4984
lines changed

13 files changed

+4972
-4984
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
module.exports = {
22
root: true,
3-
plugins: ['@dvcol/presets'],
4-
extends: ['plugin:@dvcol/presets/typescript', 'plugin:@dvcol/presets/prettier'],
3+
plugins: ["@dvcol/presets"],
4+
extends: [
5+
"plugin:@dvcol/presets/typescript",
6+
"plugin:@dvcol/presets/vitest",
7+
"plugin:@dvcol/presets/prettier",
8+
],
59
rules: {
6-
'import/no-extraneous-dependencies': [
7-
'error',
10+
"import/no-extraneous-dependencies": [
11+
"error",
812
{
913
packageDir: __dirname,
1014
},

.github/actions/build/action.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
description: Install and build the repo
3+
4+
inputs:
5+
script:
6+
description: Build script
7+
default: 'build'
8+
9+
node_version:
10+
description: Pnpm version to use
11+
required: true
12+
pnpm_version:
13+
description: Node version to use
14+
required: true
15+
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- name: 🧱 Install
21+
uses: ./.github/actions/install
22+
with:
23+
node_version: ${{ inputs.node_version }}
24+
pnpm_version: ${{ inputs.pnpm_version }}
25+
26+
- name: 🚧 Build sources
27+
shell: bash
28+
run: |
29+
# ================= 🚧 Build =================
30+
pnpm run ${{ inputs.script }}

.github/actions/install/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
description: Install and build the repo
3+
4+
inputs:
5+
node_version:
6+
description: Pnpm version to use
7+
required: true
8+
pnpm_version:
9+
description: Node version to use
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: 🏗️ Setup pnpm ${{ inputs.pnpm_version }}
16+
uses: pnpm/action-setup@v2
17+
with:
18+
version: ${{ inputs.pnpm_version }}
19+
20+
- name: 🏗️ Setup Node.js ${{ inputs.node_version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ inputs.node_version }}
24+
registry-url: 'https://registry.npmjs.org'
25+
cache: pnpm
26+
27+
- name: 🧱 Install dependencies
28+
shell: bash
29+
run: |
30+
# ================= 🧱 Install =================
31+
pnpm install

.github/workflows/build.js.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: 🚧 Build - Build sources
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
11+
workflow_dispatch:
12+
13+
env:
14+
node_version: 22.x
15+
pnpm_version: 9.x
16+
17+
jobs:
18+
build:
19+
name: 🚧 Build
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: ⛙ Checkout branch ${{ github.ref }}
24+
uses: actions/checkout@v4
25+
26+
- name: 🚧 Build
27+
uses: ./.github/actions/build
28+
29+
test:
30+
name: 🧪 Unit Test
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: ⛙ Checkout branch ${{ github.ref }}
35+
uses: actions/checkout@v4
36+
37+
- name: 🧱 Install
38+
uses: ./.github/actions/install
39+
with:
40+
node_version: ${{ env.node_version }}
41+
pnpm_version: ${{ env.pnpm_version }}
42+
43+
- name: 🧪 Unit tests
44+
run: |
45+
# ================= 🧪 Unit tests =================
46+
pnpm run test:unit
47+
48+
lint:
49+
name: 🧹 Lint
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: ⛙ Checkout branch ${{ github.ref }}
54+
uses: actions/checkout@v4
55+
56+
- name: 🧱 Install
57+
uses: ./.github/actions/install
58+
with:
59+
node_version: ${{ env.node_version }}
60+
pnpm_version: ${{ env.pnpm_version }}
61+
62+
- name: 🧹 Lint
63+
run: |
64+
# ================= 🧹 Lint =================
65+
pnpm run lint

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: ☁️ Publish - npm Publish and Github Release
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
commit-hash:
7+
description: Commit to checkout
8+
required: false
9+
type: string
10+
tag-name:
11+
description: Tag name
12+
required: false
13+
type: string
14+
skip-npm:
15+
description: Skip npm publish
16+
required: false
17+
type: boolean
18+
19+
env:
20+
node_version: 20.x
21+
pnpm_version: 8.x
22+
23+
jobs:
24+
publish-npm:
25+
name: ☁️ Publish npm
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: ⛙ Checkout branch ${{ github.ref }}
30+
uses: actions/checkout@v4
31+
with:
32+
ref: ${{ inputs.commit-hash || 'main' }}
33+
fetch-depth: 0
34+
35+
- name: 🚧 Build
36+
uses: ./.github/actions/build
37+
with:
38+
node_version: ${{ env.node_version }}
39+
pnpm_version: ${{ env.pnpm_version }}
40+
41+
- name: ☁️ Publish to npm
42+
if: ${{ inputs.skip-npm != true }}
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
run: |
46+
# ================= ☁️ Publish to npm =================
47+
pnpm publish

.github/workflows/release.js.yml

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)