Skip to content

Commit 68db79f

Browse files
authored
chore: enable publishing with npm provenance (#2247)
Adds config to publish npm packages with links back to the build that generated the artefacts. https://github.blog/2023-04-19-introducing-npm-package-provenance/
1 parent e2267d4 commit 68db79f

File tree

32 files changed

+126
-0
lines changed

32 files changed

+126
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ jobs:
218218
transport-interop
219219
]
220220
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
221+
# https://docs.npmjs.com/generating-provenance-statements
222+
permissions:
223+
id-token: write
221224
steps:
222225
- uses: GoogleCloudPlatform/release-please-action@v2
223226
id: release

packages/crypto/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS",
1620
"crypto",

packages/interface-internal/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"interface",
1620
"libp2p"

packages/kad-dht/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS"
1620
],

packages/keychain/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS",
1620
"crypto",

packages/libp2p/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"provenance": true
16+
},
1417
"keywords": [
1518
"IPFS",
1619
"libp2p",

packages/logger/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS"
1620
],

packages/metrics-prometheus/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"bugs": {
1313
"url": "https://github.com/libp2p/js-libp2p/issues"
1414
},
15+
"publishConfig": {
16+
"access": "public",
17+
"provenance": true
18+
},
1519
"type": "module",
1620
"types": "./dist/src/index.d.ts",
1721
"files": [

packages/multistream-select/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"ipfs",
1620
"libp2p",

packages/peer-collections/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/libp2p/js-libp2p/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS"
1620
],

0 commit comments

Comments
 (0)