Skip to content

Commit b9e3a33

Browse files
authored
ci(publish): migrate to node24 for npm trusted publishing (#59)
1 parent baf7b51 commit b9e3a33

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.github/workflows/publish-npm.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ jobs:
1111
permissions:
1212
contents: read
1313
id-token: write
14-
packages: write
1514
steps:
16-
- id: get-secrets
17-
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.2.1 # zizmor: ignore[unpinned-uses] provided by grafana
18-
with:
19-
repo_secrets: |
20-
NPM_TOKEN=npm_token:npm_token
21-
export_env: false
22-
2315
- name: Checkout repository
2416
uses: actions/checkout@v4
2517
with:
@@ -46,7 +38,7 @@ jobs:
4638
if: steps.version_check.outputs.changed == 'true'
4739
uses: actions/setup-node@v4
4840
with:
49-
node-version: "20"
41+
node-version-file: .nvmrc
5042
registry-url: "https://registry.npmjs.org"
5143

5244
- name: Install dependencies
@@ -55,6 +47,4 @@ jobs:
5547

5648
- name: Publish package to NPM
5749
if: steps.version_check.outputs.changed == 'true'
58-
run: npm publish --access public
59-
env:
60-
NODE_AUTH_TOKEN: ${{ fromJSON(steps.get-secrets.outputs.secrets).NPM_TOKEN }}
50+
run: npm publish

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.7.0

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"type": "git",
1919
"url": "http://github.com/grafana/eslint-config-grafana.git"
2020
},
21+
"publishConfig": {
22+
"access": "public"
23+
},
2124
"files": [
2225
"index.js",
2326
"flat.js",

0 commit comments

Comments
 (0)