Skip to content

Commit 5b058d3

Browse files
committed
Add release workflow
1 parent 8c2fedd commit 5b058d3

4 files changed

Lines changed: 3829 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
- "18"
1515
- "*"
1616
steps:
17-
- uses: actions/checkout@v6
18-
- uses: actions/setup-node@v6
17+
- uses: actions/checkout@v7
18+
- uses: actions/setup-node@v7
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm install
2222
- run: npm test
23-
- uses: codecov/codecov-action@v5
23+
- uses: codecov/codecov-action@v7
2424
with:
2525
name: Node.js ${{ matrix.node-version }}
2626
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
id-token: write # Required for NPM trusted publishing.
10+
contents: read
11+
12+
jobs:
13+
npm:
14+
name: Publish to npm
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: release
18+
permissions:
19+
contents: read
20+
id-token: write
21+
steps:
22+
- uses: actions/checkout@v7
23+
- uses: actions/setup-node@v7
24+
with:
25+
node-version: latest
26+
package-manager-cache: false # Disable automatic npm dependency caching to reduce cache poisoning risk
27+
28+
- run: npm ci --ignore-scripts
29+
- run: npm test
30+
- run: npm stage publish # Runs prepublish script.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
coverage/
33
node_modules/
44
npm-debug.log
5-
package-lock.json
65
dist
76
*.tsbuildinfo

0 commit comments

Comments
 (0)