Skip to content

Commit 4e8f420

Browse files
committed
chore(release): use Trusted Publisher
1 parent 101ffb8 commit 4e8f420

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
release:
99
runs-on: macos-latest
1010
if: startsWith(github.event.head_commit.message , 'chore(release):')
11+
permissions:
12+
id-token: write
13+
contents: read
1114
env:
1215
NODE_OPTIONS: '--max-old-space-size=8192'
1316
steps:
@@ -19,6 +22,7 @@ jobs:
1922
uses: actions/setup-node@v3
2023
with:
2124
node-version: 20
25+
registry-url: 'https://registry.npmjs.org/'
2226

2327
- name: Install dependencies
2428
run: npm install
@@ -40,5 +44,4 @@ jobs:
4044
- name: Release
4145
env:
4246
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44-
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} & npm run release
47+
run: npm run release

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
12+
env:
13+
NODE_OPTIONS: '--max-old-space-size=8192'
1314
steps:
1415
- name: Checkout
1516
uses: actions/checkout@v4

0 commit comments

Comments
 (0)