Skip to content

Commit e974f32

Browse files
committed
fix: NPM trusted publishing (test)
1 parent 135dd30 commit e974f32

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ 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
@@ -21,8 +23,18 @@ jobs:
2123
- name: Set node
2224
uses: actions/setup-node@v4
2325
with:
24-
node-version: 22.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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"prepare:fixtures": "nuxi prepare .playground && nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/i18n && nuxi prepare test/fixtures/content-v3",
5555
"dev:build": "nuxi build .playground",
5656
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build && nuxi prepare .playground",
57-
"release": "pnpm build && bumpp && pnpm -r publish",
57+
"release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\"",
5858
"test": "pnpm run prepare:fixtures && vitest",
5959
"typecheck": "tsc --noEmit",
6060
"test:attw": "attw --pack"

0 commit comments

Comments
 (0)