Skip to content

Commit 6f2dc3f

Browse files
authored
Merge pull request #97 from hypothesis/trusted-publishing
Trusted publishing
2 parents 793ffaf + 7916229 commit 6f2dc3f

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ on:
33
release:
44
types:
55
- published
6+
7+
# Trusted publishing configuration. See https://docs.npmjs.com/trusted-publishers
8+
permissions:
9+
id-token: write
10+
contents: read
11+
612
jobs:
713
build-and-publish-package:
814
runs-on: ubuntu-latest
@@ -12,13 +18,11 @@ jobs:
1218
- name: Setup Nodejs
1319
uses: actions/setup-node@v4
1420
with:
15-
node-version: '16'
21+
node-version: '24'
1622
registry-url: 'https://registry.npmjs.org'
1723
- name: Install
1824
run: yarn install --immutable
1925
- name: Build
2026
run: yarn build
2127
- name: Publish package
2228
run: npm publish --access public
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"type": "module",
66
"main": "./lib/index.js",
77
"types": "./lib/index.d.ts",
8-
"repository": "https://github.com/hypothesis/frontend-testing",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/hypothesis/frontend-testing.git"
11+
},
912
"author": "Hypothesis Developers <[email protected]>",
1013
"license": "BSD-2-Clause",
1114
"packageManager": "[email protected]",

0 commit comments

Comments
 (0)