Skip to content

Commit b4f3648

Browse files
Updated publish workflow
1 parent ab0af5c commit b4f3648

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node-version:
20-
- 20.x
21-
- 22.x
19+
node-version: [20, 22, 24]
2220
steps:
2321
- uses: actions/checkout@v6
2422
- name: Use Node.js ${{ matrix.node-version }}
@@ -30,7 +28,7 @@ jobs:
3028
- run: npm run build
3129
- run: npm run doc
3230
- name: Save build
33-
if: matrix.node-version == '20.x'
31+
if: matrix.node-version == '20'
3432
uses: actions/upload-artifact@v6
3533
with:
3634
name: build
@@ -73,7 +71,7 @@ jobs:
7371
name: build
7472
- uses: actions/setup-node@v6
7573
with:
76-
node-version: 20.x
74+
node-version: 20
7775
- uses: rlespinasse/github-slug-action@v4.x
7876
- name: Append commit hash to package version
7977
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
@@ -82,7 +80,6 @@ jobs:
8280
- uses: JS-DevTools/npm-publish@v4.1.4
8381
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
8482
with:
85-
token: ${{ secrets.NPM_TOKEN }}
8683
tag: ${{ env.GITHUB_REF_SLUG }}
8784

8885
npm-publish-latest:
@@ -95,11 +92,10 @@ jobs:
9592
name: build
9693
- uses: actions/setup-node@v6
9794
with:
98-
node-version: 20.x
95+
node-version: 20
9996
- name: Disable pre- and post-publish actions
10097
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
10198
- uses: JS-DevTools/npm-publish@v4.1.4
10299
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
103100
with:
104-
token: ${{ secrets.NPM_TOKEN }}
105101
tag: latest

0 commit comments

Comments
 (0)