Skip to content

Commit b785b61

Browse files
committed
chore: NPM trusted publishing
1 parent a9e05c1 commit b785b61

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-file: 'package.json'
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
@@ -50,7 +50,7 @@
5050
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && pnpm run prepare:fixtures",
5151
"typecheck": "vue-tsc --noEmit",
5252
"bump": "bumpp package.json --commit --push --tag",
53-
"release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\" && pnpm publish",
53+
"release": "pnpm build && pnpm test && bumpp -r -x \"pnpm run changelog\" --all",
5454
"lint": "eslint .",
5555
"lint:fix": "eslint . --fix",
5656
"test": "pnpm dev:prepare && vitest --run",

0 commit comments

Comments
 (0)