Skip to content

Commit 74c9d05

Browse files
rfgamaralclaude
andauthored
ci: Enable trusted publishing and npm provenance (#142)
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 2327b78 commit 74c9d05

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/core-deploy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
tags:
66
- 'core-v*'
77

8+
permissions:
9+
# Enable reading repository contents (allows checkout without token)
10+
contents: read
11+
# Enable the use of OIDC for trusted publishing and npm provenance
12+
id-token: write
13+
# Enable the use of GitHub Packages registry
14+
packages: write
15+
816
jobs:
917
# Publish to GitHub package registry
1018
publish-github:
@@ -47,11 +55,12 @@ jobs:
4755
registry-url: https://registry.npmjs.org/
4856
scope: '@doist'
4957

58+
- name: Ensure npm 11.5.1 or later is installed
59+
run: npm install -g npm@latest
60+
5061
- name: Install dependencies
5162
run: npm run bootstrap-ci:common
5263

5364
- name: Publish package
5465
working-directory: ./packages/ui-extensions-core
55-
run: npm publish --access public
56-
env:
57-
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
66+
run: npm publish --provenance --access public

packages/ui-extensions-core/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
}
1414
},
1515
"type": "module",
16-
"repository": {
17-
"type": "git",
18-
"url": "https://github.com/Doist/ui-extensions"
19-
},
16+
"repository": "https://github.com/Doist/ui-extensions",
2017
"scripts": {
2118
"watch": "npm run build && yalc push && chokidar src -c \"npm run build && yalc push\"",
2219
"lint-fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",

packages/ui-extensions-react/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
"dist",
1111
"styles"
1212
],
13-
"repository": {
14-
"type": "git",
15-
"url": "https://github.com/Doist/ui-extensions"
16-
},
13+
"repository": "https://github.com/Doist/ui-extensions",
1714
"engines": {
1815
"node": ">=16"
1916
},

0 commit comments

Comments
 (0)