Skip to content

Commit a8274bb

Browse files
committed
ci: enable oidc publish
1 parent 0f3b1ff commit a8274bb

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.github/actions/setup/action.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ inputs:
55
node-version:
66
description: The version of node.js
77
required: false
8-
default: '20'
8+
default: '24'
99

1010
runs:
1111
using: composite
1212
steps:
1313
- name: Install pnpm
14-
uses: pnpm/action-setup@v2
15-
with:
16-
run_install: false
14+
uses: pnpm/action-setup@v4
1715

1816
- name: Setup node
1917
uses: actions/setup-node@v4
@@ -22,10 +20,20 @@ runs:
2220
cache: pnpm
2321
registry-url: 'https://registry.npmjs.org'
2422

25-
- name: Setup ni
26-
run: npm i -g @antfu/ni
23+
- name: Check npm version
24+
shell: bash
25+
run: npm --version
26+
27+
- name: Update npm
28+
shell: bash
29+
run: npm install -g npm@latest
30+
31+
# NPM v11.5.0 added support for OIDC publish
32+
# https://docs.npmjs.com/cli/v11/using-npm/changelog#1150-2025-07-24
33+
- name: Check npm version
2734
shell: bash
35+
run: npm --version
2836

2937
- name: Install
30-
run: ni
38+
run: pnpm install
3139
shell: bash

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
runs-on: ubuntu-latest
2121
needs: [version]
2222
if: ${{ needs.version.outputs.release_created }}
23+
permissions:
24+
id-token: write
2325
steps:
2426
- uses: actions/checkout@v4
2527

@@ -30,5 +32,3 @@ jobs:
3032

3133
- name: Publish to NPM
3234
run: pnpm publish
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @ocavue/eslint-config
22

3+
[![npm](https://img.shields.io/npm/v/@ocavue/eslint-config)](https://www.npmjs.com/package/@ocavue/eslint-config)
4+
35
A set of ESLint shareable configs for TypeScript projects.
46

57
- Out of the box support for TypeScript, React, and Markdown

src/react.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Linter } from 'eslint'
22
import reactPlugin from 'eslint-plugin-react'
3-
import reactCompiler from "eslint-plugin-react-compiler"
3+
import reactCompiler from 'eslint-plugin-react-compiler'
44
import reactHooksPlugin from 'eslint-plugin-react-hooks'
55

66
import { resolveReactOptions, type ReactOptions } from './options.js'

0 commit comments

Comments
 (0)