Skip to content

Commit 7474891

Browse files
committed
feat: streamline pnpm installation in CI workflows by removing duplicate steps
1 parent feb9b98 commit 7474891

3 files changed

Lines changed: 43 additions & 43 deletions

File tree

.github/workflows/auto-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
fetch-depth: 0
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828

29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v2
31+
with:
32+
version: '9.1.4'
33+
2934
- name: Setup Node.js
3035
uses: actions/setup-node@v4
3136
with:
3237
node-version: '18.x'
3338
cache: 'pnpm'
3439

35-
- name: Install pnpm
36-
uses: pnpm/action-setup@v2
37-
with:
38-
version: '9.1.4'
39-
4040
- name: Install dependencies
4141
run: pnpm install --frozen-lockfile
4242

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v2
19+
with:
20+
version: '9.1.4'
21+
1722
- name: Setup Node.js
1823
uses: actions/setup-node@v4
1924
with:
2025
node-version: '18.x'
2126
cache: 'pnpm'
2227

23-
- name: Install pnpm
24-
uses: pnpm/action-setup@v2
25-
with:
26-
version: '9.1.4'
27-
2828
- name: Install dependencies
2929
run: pnpm install --frozen-lockfile
3030

@@ -48,17 +48,17 @@ jobs:
4848
- name: Checkout code
4949
uses: actions/checkout@v4
5050

51+
- name: Install pnpm
52+
uses: pnpm/action-setup@v2
53+
with:
54+
version: '9.1.4'
55+
5156
- name: Setup Node.js ${{ matrix.node-version }}
5257
uses: actions/setup-node@v4
5358
with:
5459
node-version: ${{ matrix.node-version }}
5560
cache: 'pnpm'
5661

57-
- name: Install pnpm
58-
uses: pnpm/action-setup@v2
59-
with:
60-
version: '9.1.4'
61-
6262
- name: Install dependencies
6363
run: pnpm install --frozen-lockfile
6464

@@ -86,17 +86,17 @@ jobs:
8686
- name: Checkout code
8787
uses: actions/checkout@v4
8888

89+
- name: Install pnpm
90+
uses: pnpm/action-setup@v2
91+
with:
92+
version: '9.1.4'
93+
8994
- name: Setup Node.js
9095
uses: actions/setup-node@v4
9196
with:
9297
node-version: '18.x'
9398
cache: 'pnpm'
9499

95-
- name: Install pnpm
96-
uses: pnpm/action-setup@v2
97-
with:
98-
version: '9.1.4'
99-
100100
- name: Install dependencies
101101
run: pnpm install --frozen-lockfile
102102

@@ -119,17 +119,17 @@ jobs:
119119
- name: Checkout code
120120
uses: actions/checkout@v4
121121

122+
- name: Install pnpm
123+
uses: pnpm/action-setup@v2
124+
with:
125+
version: '9.1.4'
126+
122127
- name: Setup Node.js
123128
uses: actions/setup-node@v4
124129
with:
125130
node-version: '18.x'
126131
cache: 'pnpm'
127132

128-
- name: Install pnpm
129-
uses: pnpm/action-setup@v2
130-
with:
131-
version: '9.1.4'
132-
133133
- name: Install dependencies
134134
run: pnpm install --frozen-lockfile
135135

.github/workflows/release.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ jobs:
7474
- name: Checkout code
7575
uses: actions/checkout@v4
7676

77+
- name: Install pnpm
78+
uses: pnpm/action-setup@v2
79+
with:
80+
version: ${{ env.PNPM_VERSION }}
81+
7782
- name: Setup Node.js
7883
uses: actions/setup-node@v4
7984
with:
8085
node-version: ${{ env.NODE_VERSION }}
8186
cache: 'pnpm'
8287

83-
- name: Install pnpm
84-
uses: pnpm/action-setup@v2
85-
with:
86-
version: ${{ env.PNPM_VERSION }}
87-
8888
- name: Install dependencies
8989
run: pnpm install --frozen-lockfile
9090

@@ -133,6 +133,11 @@ jobs:
133133
- name: Checkout code
134134
uses: actions/checkout@v4
135135

136+
- name: Install pnpm
137+
uses: pnpm/action-setup@v2
138+
with:
139+
version: ${{ env.PNPM_VERSION }}
140+
136141
- name: Setup Node.js
137142
uses: actions/setup-node@v4
138143
with:
@@ -141,11 +146,6 @@ jobs:
141146
registry-url: 'https://npm.pkg.github.com'
142147
scope: '@automations-project'
143148

144-
- name: Install pnpm
145-
uses: pnpm/action-setup@v2
146-
with:
147-
version: ${{ env.PNPM_VERSION }}
148-
149149
- name: Install dependencies
150150
run: pnpm install --frozen-lockfile
151151

@@ -179,18 +179,18 @@ jobs:
179179
- name: Checkout code
180180
uses: actions/checkout@v4
181181

182+
- name: Install pnpm
183+
uses: pnpm/action-setup@v2
184+
with:
185+
version: ${{ env.PNPM_VERSION }}
186+
182187
- name: Setup Node.js
183188
uses: actions/setup-node@v4
184189
with:
185190
node-version: ${{ env.NODE_VERSION }}
186191
cache: 'pnpm'
187192
registry-url: 'https://registry.npmjs.org'
188193

189-
- name: Install pnpm
190-
uses: pnpm/action-setup@v2
191-
with:
192-
version: ${{ env.PNPM_VERSION }}
193-
194194
- name: Install dependencies
195195
run: pnpm install --frozen-lockfile
196196

@@ -232,7 +232,7 @@ jobs:
232232
run: |
233233
VERSION="v${{ needs.validate-release.outputs.version }}"
234234
PREV_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "")
235-
235+
236236
if [ -z "$PREV_TAG" ]; then
237237
CHANGELOG="🎉 Initial release of Scrappey n8n Node v${{ needs.validate-release.outputs.version }}"
238238
else
@@ -241,7 +241,7 @@ jobs:
241241
CHANGELOG="- Bug fixes and improvements"
242242
fi
243243
fi
244-
244+
245245
{
246246
echo "changelog<<EOF"
247247
echo "## What's Changed"
@@ -310,4 +310,4 @@ jobs:
310310
if: needs.create-release.result == 'failure'
311311
run: |
312312
echo "❌ Release failed for v${{ needs.validate-release.outputs.version }}"
313-
exit 1
313+
exit 1

0 commit comments

Comments
 (0)