Skip to content

Commit 2a6d210

Browse files
authored
Merge pull request #81 from DestinyItemManager/trusted-publish
Set up NPM trusted publishing
2 parents 502e22e + cb06a14 commit 2a6d210

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66
- master
77

88
jobs:
9-
build:
9+
publish:
10+
environment: publish
11+
permissions:
12+
contents: read
13+
id-token: write
1014
runs-on: ubuntu-latest
1115
steps:
12-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v5
1317
with:
1418
submodules: recursive
1519

@@ -25,13 +29,11 @@ jobs:
2529

2630
- name: Setup Node
2731
if: steps.check.outputs.changed == 'true'
28-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
2933
with:
3034
node-version-file: '.nvmrc'
3135
registry-url: https://registry.npmjs.org/
3236

3337
- name: Publish the package to NPM
3438
if: steps.check.outputs.changed == 'true'
35-
run: cd lib && npm publish
36-
env:
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM will automatically authenticate with this
39+
run: cd lib && npm publish --provenance

0 commit comments

Comments
 (0)