Skip to content

Commit ed17362

Browse files
committed
fix: NPM Trusted Publishing
1 parent 73fd636 commit ed17362

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,39 @@ name: Release
22

33
permissions:
44
contents: write
5+
id-token: write
56

67
on:
78
push:
89
tags:
910
- 'v*'
11+
1012
jobs:
1113
release:
1214
runs-on: ubuntu-latest
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
with:
1618
fetch-depth: 0
1719

1820
- name: Install pnpm
1921
uses: pnpm/action-setup@v4
2022

2123
- name: Set node
22-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@v5
2325
with:
24-
node-version: 24.x
26+
node-version: latest
27+
cache: pnpm
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Force Set pnpm Registry
31+
run: pnpm config set registry https://registry.npmjs.org
2532

2633
- run: npx changelogithub
2734
env:
2835
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
37+
- name: Install Dependencies
38+
run: pnpm i
39+
40+
- run: pnpm publish -r --access public --no-git-checks

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build",
4949
"dev": "nuxi dev playground",
5050
"dev:docs": "nuxi dev docs",
51+
"prepack": "pnpm run build",
5152
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare",
5253
"lint": "eslint . --fix",
5354
"release": "pnpm build && bumpp && pnpm -r publish --access public",

0 commit comments

Comments
 (0)