Skip to content

Commit 6297a52

Browse files
authored
CI: use OIDC, fix badge, pack --dry-run, add node 25 (#163)
* CI: use OIDC, fix badge, pack --dry-run, add node 25 * npm pack --dry-run, fail-fast: false * bump version, dev deps * rename branch * update actions
1 parent b42c265 commit 6297a52

File tree

5 files changed

+477
-477
lines changed

5 files changed

+477
-477
lines changed

.github/workflows/npm-publish.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
name: Publish to NPM
1+
name: Publish to npm
22

33
on:
44
push:
55
tags:
66
- v*
77

8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
812
jobs:
913
publish:
1014
runs-on: ubuntu-latest
1115

1216
steps:
13-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1418
with:
1519
persist-credentials: false
16-
1720
- name: Setup Node.js
18-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@v6
1922
with:
20-
node-version: 24
23+
node-version: '24'
2124
registry-url: 'https://registry.npmjs.org'
22-
25+
- name: Update npm to latest
26+
run: npm install -g npm@latest
2327
- run: npm ci
2428
- run: npm run build
2529
- run: npm run build:types
30+
- run: npm run test
2631

27-
- name: Publish to NPM
32+
- name: Publish to npm
2833
run: npm publish
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
node: [20, 22, 24]
16+
node: ['20', '22', '24', '25']
1617

1718
steps:
18-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
1920
with:
2021
persist-credentials: false
2122

2223
- name: Setup Node.js ${{ matrix.node }}
23-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@v6
2425
with:
2526
node-version: ${{ matrix.node }}
2627
cache: 'npm'
@@ -37,7 +38,7 @@ jobs:
3738
flag-name: ${{ matrix.node }}
3839
parallel: true
3940

40-
- run: npm publish --dry-run
41+
- run: npm pack --dry-run
4142

4243
finish:
4344
needs: build
@@ -48,4 +49,4 @@ jobs:
4849
with:
4950
github-token: ${{ secrets.GITHUB_TOKEN }}
5051
parallel-finished: true
51-
carryforward: '20,22,24'
52+
carryforward: '20,22,24,25'

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# n2words
22

3-
[![Test](https://github.com/forzagreen/n2words/workflows/Test/badge.svg?branch=master)](https://github.com/forzagreen/n2words/actions)
4-
[![Coverage Status](https://coveralls.io/repos/github/forzagreen/n2words/badge.svg?branch=master)](https://coveralls.io/github/forzagreen/n2words?branch=master)
3+
[![CI](https://github.com/forzagreen/n2words/actions/workflows/test.yml/badge.svg)](https://github.com/forzagreen/n2words/actions/workflows/test.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/forzagreen/n2words/badge.svg?branch=main)](https://coveralls.io/github/forzagreen/n2words?branch=main)
55
[![npm](https://img.shields.io/npm/v/n2words.svg)](https://npmjs.com/package/n2words)
66
[![npm](https://img.shields.io/npm/dw/n2words)](https://npmjs.com/package/n2words)
77
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/n2words/badge)](https://www.jsdelivr.com/package/npm/n2words)
@@ -91,4 +91,4 @@ __This library is in active development.__ We want to improve the design and pro
9191

9292
## License
9393

94-
[MIT](https://github.com/forzagreen/n2words/blob/master/LICENSE)
94+
[MIT](https://github.com/forzagreen/n2words/blob/main/LICENSE)

0 commit comments

Comments
 (0)