Skip to content

Commit 2bc70c9

Browse files
authored
Setup trusted publishing for npm (#17)
1 parent d6f8514 commit 2bc70c9

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed
File renamed without changes.

.github/workflows/release-npm.yaml renamed to .github/workflows/release-npm.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches: [release/*]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
812
publish-npm:
913
name: Publish NPM module
@@ -13,12 +17,9 @@ jobs:
1317
- uses: actions/checkout@v5
1418
- uses: actions/setup-node@v5
1519
with:
16-
node-version: '22.x'
20+
node-version: '24.x'
1721
cache: 'npm'
1822
cache-dependency-path: package-lock.json
19-
- run: npm ci
20-
- run: npm run build
21-
- uses: cucumber/[email protected]
22-
with:
23-
npm-token: ${{ secrets.NPM_TOKEN }}
24-
npm-tag: 'latest'
23+
registry-url: 'https://registry.npmjs.org'
24+
- run: npm install-ci-test
25+
- run: npm publish
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"exports:update": "api-extractor run --verbose --local",
1818
"fix": "eslint --max-warnings 0 src --fix && prettier --write src",
1919
"lint": "eslint --max-warnings 0 src && prettier --check src",
20-
"test": "mocha \"src/**/*.spec.ts\""
20+
"test": "mocha \"src/**/*.spec.ts\"",
21+
"prepublishOnly": "npm run build"
2122
},
2223
"repository": {
2324
"type": "git",

0 commit comments

Comments
 (0)