aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-01 18:04:51 -0800
committerFuwn <[email protected]>2026-03-01 18:06:05 -0800
commitf25cce0d781ab5bc650798bac27f77398ef25a45 (patch)
treeae58fb8ddf9a63e5a0bd502f1378154dbd3f21e7 /.github
parentchore(dx): add fast changed-files lint and format commands (diff)
downloaddue.moe-f25cce0d781ab5bc650798bac27f77398ef25a45.tar.xz
due.moe-f25cce0d781ab5bc650798bac27f77398ef25a45.zip
ci(dx): extract shared node+pnpm setup into composite action
Diffstat (limited to '.github')
-rw-r--r--.github/actions/setup-node-pnpm/action.yml35
-rw-r--r--.github/workflows/quality.yml15
-rw-r--r--.github/workflows/release-trigger-prod.yml15
3 files changed, 39 insertions, 26 deletions
diff --git a/.github/actions/setup-node-pnpm/action.yml b/.github/actions/setup-node-pnpm/action.yml
new file mode 100644
index 00000000..350c60a1
--- /dev/null
+++ b/.github/actions/setup-node-pnpm/action.yml
@@ -0,0 +1,35 @@
+name: Setup Node And pnpm
+description: Setup pnpm, setup Node.js with pnpm cache, and install dependencies
+
+inputs:
+ node-version:
+ description: Node.js version
+ required: false
+ default: "20"
+ pnpm-version:
+ description: pnpm version
+ required: false
+ default: "10.28.0"
+ install:
+ description: Whether to install dependencies
+ required: false
+ default: "true"
+
+runs:
+ using: composite
+ steps:
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: ${{ inputs.pnpm-version }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ inputs.node-version }}
+ cache: pnpm
+
+ - name: Install dependencies
+ if: ${{ inputs.install == 'true' }}
+ shell: bash
+ run: pnpm install --frozen-lockfile
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 532b1f72..a67a1b28 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -13,19 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Setup pnpm
- uses: pnpm/action-setup@v4
- with:
- version: 10.28.0
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
-
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
+ - name: Setup toolchain
+ uses: ./.github/actions/setup-node-pnpm
- name: Generate GraphQL artifacts
run: pnpm exec sveltekit-graphql generate
diff --git a/.github/workflows/release-trigger-prod.yml b/.github/workflows/release-trigger-prod.yml
index a0691e96..410829e1 100644
--- a/.github/workflows/release-trigger-prod.yml
+++ b/.github/workflows/release-trigger-prod.yml
@@ -18,19 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Setup pnpm
- uses: pnpm/action-setup@v4
- with:
- version: 10.28.0
-
- - name: Use Node.js 20
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
-
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
+ - name: Setup toolchain
+ uses: ./.github/actions/setup-node-pnpm
- name: 🚀 Deploy Trigger.dev
env: