Skip to content

Commit d2dc3ed

Browse files
committed
chore: OIDC経由でリリースするようにする
1 parent d082eae commit d2dc3ed

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/publishRelease.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
types:
66
- labeled
77

8+
permissions:
9+
id-token: write
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
814
jobs:
915
publish_release:
1016
if: github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'release candidate') && github.event.label.name == 'approve release'
@@ -27,18 +33,18 @@ jobs:
2733
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
2834
git config user.name "github-actions[bot]"
2935
- run: pnpm install --frozen-lockfile
36+
# Ensure npm 11.5.1 or later is installed for OICD.
37+
- run: |
38+
npm install -g npm@latest
39+
echo "Updated npm version: $(npm -v)"
3040
- run: pnpm release
3141
if: ${{ env.IS_PRERELEASE == 'false' }}
3242
- run: pnpm release --prerelease
3343
if: ${{ env.IS_PRERELEASE == 'true' }}
3444
- run: pnpm publish --publish-branch release-candidate
3545
if: ${{ env.IS_PRERELEASE == 'false' }}
36-
env:
37-
NODE_AUTH_TOKEN: ${{ secrets.KUFU_NPM_RELEASE_TOKEN }}
3846
- run: pnpm publish --tag prerelease --publish-branch release-candidate
3947
if: ${{ env.IS_PRERELEASE == 'true' }}
40-
env:
41-
NODE_AUTH_TOKEN: ${{ secrets.KUFU_NPM_RELEASE_TOKEN }}
4248
- run: echo NEW_TAG=$(git describe) >> $GITHUB_ENV
4349
- run: git push origin $NEW_TAG
4450
- run: pnpm dlx ts-node ./scripts/getLatestChangelog.ts > ${{ env.CHANGELOG_PATH }}

0 commit comments

Comments
 (0)