Skip to content

Commit 6e96d19

Browse files
committed
chore: update CI workflows to improve node version handling and cleanup steps
1 parent 3733b14 commit 6e96d19

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- '**'
7+
tags:
8+
- '!**'
79
pull_request:
810
branches:
911
- main

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
node: [22]
1714
steps:
1815
- uses: actions/checkout@v4
1916

20-
- name: Setup Node.js ${{ matrix.node }}
17+
- name: Setup Node.js
2118
uses: actions/setup-node@v4
2219
with:
23-
node-version: ${{ matrix.node }}
20+
node-version-file: '.node-version'
2421

2522
- name: Install dependencies
2623
run: |
@@ -51,9 +48,6 @@ jobs:
5148
publish:
5249
env:
5350
CHECK_NPM_TOKEN: ${{ secrets.NPM_TOKEN != '' }}
54-
strategy:
55-
matrix:
56-
node: [22]
5751
needs: build
5852
runs-on: ubuntu-latest
5953
permissions:
@@ -70,7 +64,7 @@ jobs:
7064
- name: Set npm registry url
7165
uses: actions/setup-node@v4
7266
with:
73-
node-version: ${{ matrix.node }}
67+
node-version-file: '.node-version'
7468
registry-url: 'https://registry.npmjs.org'
7569

7670
- name: Dry run publish
@@ -81,3 +75,8 @@ jobs:
8175
env:
8276
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8377
run: npm publish . --provenance --access public
78+
79+
- name: Clean up
80+
uses: geekyeggo/delete-artifact@v5
81+
with:
82+
name: dist

0 commit comments

Comments
 (0)