Skip to content

npm Trusted Publishingでの自動publishを追加 - #10

Merged
mimo-3 merged 1 commit into
mainfrom
npm-trusted-publishing
Jul 30, 2026
Merged

npm Trusted Publishingでの自動publishを追加#10
mimo-3 merged 1 commit into
mainfrom
npm-trusted-publishing

Conversation

@mimo-3

@mimo-3 mimo-3 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

概要

mainへのpush時に、npm未公開のバージョンをTrusted Publishingで自動公開します。

変更内容

  • npm OIDC用に id-token: write を追加
  • Node 24とnpm registryを設定
  • npm未公開の場合だけ、check・test・buildを通してからpublish
  • 連続pushのリリースを落とさず順番に処理
  • release buildのpackage-manager cacheを無効化
  • 既存のnpmバージョンとGitHub tagはそれぞれ判定し、再実行しても重複公開・重複Releaseをしない

マージ時の挙動

現在のnpm最新版は0.22.1、mainは0.24.1です。マージ後は0.24.1をnpmへ公開し、既存の v0.24.1 tagがあるためGitHub Release作成だけスキップします。

npm側の事前設定

npmjs.comのTrusted Publisherを次の内容で登録してください。

  • Organization/User: mimo-3
  • Repository: slack-cli
  • Workflow: release.yml
  • Environment: 未指定
  • Allowed action: npm publish

NPM_TOKEN は不要です。

動作確認

  • npm run check
  • npm test -- --run(65ファイル・750テスト)
  • npm run build
  • npm publish --dry-run

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@mimo-3
mimo-3 force-pushed the npm-trusted-publishing branch from 8b60513 to 4369a3f Compare July 30, 2026 00:18
@mimo-3
mimo-3 merged commit 2dee79c into main Jul 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant