Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit 4fe5043

Browse files
authored
Merge pull request #724 from knowledge-work/trusted-publisher
trusted publisher
2 parents 60b5da9 + d6cdfad commit 4fe5043

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/renovate.json5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
],
1010
timezone: 'Asia/Tokyo',
1111
postUpdateOptions: ['yarnDedupeHighest'],
12+
minimumReleaseAge: '7 days',
1213
}

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ concurrency:
1717
group: ${{ github.workflow }}
1818
cancel-in-progress: true
1919

20+
permissions:
21+
id-token: write # Required for OIDC
22+
contents: write # create tag and release
23+
2024
jobs:
2125
publish:
2226
runs-on: ubuntu-latest
@@ -32,6 +36,10 @@ jobs:
3236
cache: 'pnpm'
3337
registry-url: 'https://registry.npmjs.org'
3438

39+
# Trusted publishing requires npm CLI version 11.5.1 or later.
40+
- name: Ensure npm >= 11.5.1
41+
run: npm i -g npm@^11.5.1
42+
3543
- name: Install dependencies
3644
run: pnpm i --frozen-lockfile
3745

@@ -43,8 +51,6 @@ jobs:
4351
pnpm version ${{ github.event_name == 'schedule' && 'patch' || github.event.inputs.versionClass }}
4452
pnpm release
4553
echo "new_version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
46-
env:
47-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4854
4955
- name: Create release
5056
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"format": "prettier --write .",
3434
"release": "pnpm release:check && pnpm release:publish",
3535
"release:check": "echo \"Run check for version $npm_package_version\" && pnpm check",
36-
"release:publish": "git push --tags && git push origin main && pnpm publish ."
36+
"release:publish": "npm publish . && git push origin main && git push --tags"
3737
},
3838
"dependencies": {
3939
"@eslint/eslintrc": "3.3.1",

0 commit comments

Comments
 (0)