Skip to content

Commit 30ad1a1

Browse files
committed
fix: NPM Trusted Publishing
1 parent 140d867 commit 30ad1a1

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
permissions:
4+
contents: write
5+
id-token: write
6+
37
on:
48
push:
59
tags:
@@ -14,27 +18,23 @@ jobs:
1418
fetch-depth: 0
1519

1620
- name: Install pnpm
17-
uses: pnpm/action-setup@v4.0.0
21+
uses: pnpm/action-setup@v4
1822

19-
- name: Use Node.js v24
23+
- name: Set node
2024
uses: actions/setup-node@v5
2125
with:
22-
node-version: v24
23-
registry-url: https://registry.npmjs.org/
26+
node-version: latest
2427
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

26-
- run: npx conventional-github-releaser -p angular
27-
continue-on-error: true
33+
- run: npx changelogithub
2834
env:
29-
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}
35+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3036

3137
- name: Install Dependencies
32-
run: pnpm install
38+
run: pnpm i
3339

34-
- name: PNPM build
35-
run: pnpm run build
36-
37-
- name: Publish to NPM
38-
run: pnpm -r publish --access public --no-git-checks
39-
env:
40-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
40+
- run: pnpm publish -r --access public --no-git-checks

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"build:pkg": "pnpm -r --filter=./packages/** run build",
1515
"stub": "JITI_ESM_RESOLVE=true && pnpm -r --parallel run stub",
1616
"lint": "eslint . --fix",
17-
"release": "bumpp package.json packages/*/package.json --commit --push --tag --execute=\"pnpm run build\"",
17+
"bump": "bumpp package.json packages-aliased/*/package.json packages/*/package.json --commit --push --tag",
18+
"release": "pnpm build && pnpm bump",
1819
"test": "vitest",
1920
"test:update": "vitest -u",
2021
"docs": "npm -C docs run dev",

0 commit comments

Comments
 (0)