Skip to content

Commit 8534627

Browse files
committed
ci: setup npm trusted publisher
1 parent d4b354a commit 8534627

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/npm.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Publish NPM Package
22

3+
permissions:
4+
id-token: write
5+
6+
37
on:
48
workflow_dispatch: # Trigger manually through GitHub Actions interface
59

@@ -8,7 +12,7 @@ on:
812
- "v*" # Trigger on version tags (e.g., v1.0.0)
913

1014
env:
11-
NODE_VERSION: lts/hydrogen
15+
NODE_VERSION: lts/jod
1216

1317
jobs:
1418
publish:
@@ -31,5 +35,3 @@ jobs:
3135

3236
- name: Publish to npm
3337
run: scripts/publish-lib.sh
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

lib/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"name": "@cowprotocol/cms",
33
"version": "*** THE VERSION IS OVERRIDDEN AT PUBLISHING TIME ***",
44
"description": "Cow Protocol CMS",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/cowprotocol/cms.git",
8+
"directory": "lib"
9+
},
510
"main": "dist/lib.js",
611
"types": "dist/lib.d.ts",
712
"source": "src/lib.ts",

0 commit comments

Comments
 (0)