Skip to content

Commit bb09c7c

Browse files
authored
ci: npm publish with provenance (#1582)
* npm publish with provenance * update token to allow creating id-token
1 parent 20a1d24 commit bb09c7c

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.changes/config.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@
99
"url": "https://registry.npmjs.com/${ pkg.pkgFile.pkg.name }/${ pkg.pkgFile.version }"
1010
}
1111
},
12-
"publish": ["pnpm build", "pnpm publish --access public --no-git-checks"]
12+
"publish": [
13+
{
14+
"command": "pnpm build",
15+
"dryRunCommand": "pnpm build"
16+
},
17+
{
18+
"command": "npm publish --provenance --access public",
19+
"dryRunCommand": "npm publish --provenance --access public --dry-run",
20+
"pipe": true
21+
}
22+
]
1323
},
1424
"rust": {
1525
"version": true,

.github/workflows/covector-version-or-publish-v2.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
branches:
1010
- v2
1111

12+
permissions:
13+
# required for npm provenance
14+
id-token: write
15+
# required to create the GitHub Release
16+
contents: write
17+
# required for creating the Version Packages Release
18+
pull-requests: write
19+
1220
jobs:
1321
version-or-publish:
1422
runs-on: ubuntu-latest

.github/workflows/covector-version-or-publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
branches:
1010
- v1
1111

12+
permissions:
13+
# required for npm provenance
14+
id-token: write
15+
# required to create the GitHub Release
16+
contents: write
17+
# required for creating the Version Packages Release
18+
pull-requests: write
19+
1220
jobs:
1321
version-or-publish:
1422
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)