@@ -5,18 +5,20 @@ name: Publish Packages
55on :
66 push :
77 paths :
8- - ' packages/**'
8+ - " packages/**"
99 # For security reasons, this should never be set to anything but `main`
1010 branches : [main]
1111 workflow_dispatch :
1212 inputs :
1313 package :
14- description : ' Specific package to publish (leave empty for all packages)'
14+ description : " Specific package to publish (leave empty for all packages)"
1515 required : false
1616 type : string
1717
1818permissions :
1919 contents : read
20+ # For npm OIDC (https://docs.npmjs.com/trusted-publishers)
21+ id-token : write
2022
2123env :
2224 COMMIT_SHA : ${{ github.sha }}
@@ -110,13 +112,11 @@ jobs:
110112 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
111113 with :
112114 # Don't use caching here as we never install dependencies in this workflow
113- node-version-file : ' .nvmrc'
114- registry-url : ' https://registry.npmjs.org'
115+ node-version-file : " .nvmrc"
116+ registry-url : " https://registry.npmjs.org"
115117
116118 - name : Publish
117119 working-directory : packages/${{ matrix.package }}
118- env :
119- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
120120 run : |
121121 # Install deps
122122 pnpm install --frozen-lockfile
@@ -134,9 +134,9 @@ jobs:
134134 if : ${{ github.event_name == 'workflow_dispatch' }}
135135 uses : rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
136136 env :
137- SLACK_COLOR : ' #43853D'
137+ SLACK_COLOR : " #43853D"
138138 SLACK_ICON : https://github.com/nodejs.png?size=48
139- SLACK_TITLE : ' :rocket: Package Published: ${{ matrix.package }}'
139+ SLACK_TITLE : " :rocket: Package Published: ${{ matrix.package }}"
140140 SLACK_MESSAGE : |
141141 :package: *Package*: `${{ matrix.package }}` (<https://www.npmjs.com/package/@node-core/${{ matrix.package }}|View on npm>)
142142 :bust_in_silhouette: *Published by*: ${{ github.triggering_actor }}
0 commit comments