Skip to content

Commit 5d5fbdd

Browse files
Publish package via trusted publishing (#27)
1 parent 76b30ca commit 5d5fbdd

File tree

4 files changed

+751
-1918
lines changed

4 files changed

+751
-1918
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
concurrency:
2323
group: ${{ github.workflow }}
2424
run-name: "Release (increment: ${{ github.event.inputs.increment }}, prerelease: ${{ github.event.inputs.prerelease || 'none' }}${{ github.event.inputs.dry-run == 'true' && ', dry run' || '' }})"
25+
permissions:
26+
id-token: write
27+
contents: read
2528
jobs:
2629
release:
2730
runs-on: ubuntu-latest
@@ -31,17 +34,12 @@ jobs:
3134
- name: Setup Node.js
3235
uses: actions/setup-node@v4
3336
with:
34-
node-version: 23
37+
node-version: "22.21.0"
3538
cache: npm
3639
- name: Setup git config
3740
run: |
3841
git config user.name "github-actions[bot]"
3942
git config user.email "github-actions[bot]@users.noreply.github.com"
40-
- name: Setup npm config
41-
run: |
42-
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
43-
env:
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4543
- name: Install dependencies
4644
run: npm ci
4745
- name: Release package
@@ -58,5 +56,4 @@ jobs:
5856
fi
5957
npm run release -- $ARGS --ci
6058
env:
61-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6259
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.release-it.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"release": true,
1616
"releaseName": "v${version}"
1717
},
18+
"npm": {
19+
"skipChecks": true
20+
},
1821
"hooks": {
1922
"before:init": ["npm run build", "npm run lint"],
2023
"after:bump": "npm run format -- package.json"

0 commit comments

Comments
 (0)