Skip to content

Commit 49a338e

Browse files
authored
Update npm publish workflow for consistency and clarity
1 parent 217cfe6 commit 49a338e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ name: publish
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'v*' # or whatever tag pattern you like
77

88
permissions:
9-
id-token: write
109
contents: read
11-
12-
defaults:
13-
run:
14-
working-directory: node-red-contrib-crapssim
10+
id-token: write # REQUIRED for trusted publishing
1511

1612
jobs:
1713
publish:
@@ -21,17 +17,20 @@ jobs:
2117
- name: Checkout repo
2218
uses: actions/checkout@v4
2319

24-
- name: Setup Node.js
20+
- name: Setup Node
2521
uses: actions/setup-node@v4
2622
with:
2723
node-version: 20
28-
registry-url: 'https://registry.npmjs.org/'
24+
registry-url: 'https://registry.npmjs.org'
2925

3026
- name: Install deps
27+
working-directory: node-red-contrib-crapssim
3128
run: npm install
3229

3330
- name: Run tests
31+
working-directory: node-red-contrib-crapssim
3432
run: npm test
3533

3634
- name: Publish to npm (trusted publishing)
35+
working-directory: node-red-contrib-crapssim
3736
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)