Migrate the npm packages publication to trusted publishing

Đang mở
#3,654 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, yaml
Lĩnh vực
ci-cd, release

Hướng nghiên cứu

Start by locating the publish-npm-package action and the pre-release, release, manual-publish-npm, and ci workflows. Update publication to use GitHub Actions OIDC with id-token: write and the required npm CLI version, then verify dry runs and check how next versions are promoted to latest without a publish token. The issue also calls for configuring each npm package’s trusted publisher and removing the API token secrets after publication works.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

CI/CD :factory:

Why

npm deprecates the granular access tokens with direct publish access that bypass 2FA, and publishing new versions directly with such a token will no longer be possible in January 2027, whereas our workflows publish the npm packages with an API token (see https://github.blog/changelog/2026-07-08-npm-install-time-security-and-gat-bypass2fa-deprecation/ and https://github.com/npm/cli/issues/8547#issuecomment-5918553542).

What

Migrate the publication of the npm packages to trusted publishing from GitHub Actions (OIDC), so that the publication no longer relies on long-lived npm tokens.

How

  • Configure the trusted publisher (repository and workflows) of each npm package on npmjs.com (with "Allow npm dist-tag" ticked) (@jpraynaud)
  • Update the publish-npm-package action to publish with OIDC (id-token: write permission, minimum npm CLI version) instead of the API token
  • Adapt the publication jobs of the pre-release, release, manual-publish-npm and ci (dry run) workflows
  • Check how the promotion of a next version to latest works without a publish token
  • Remove the npm API token secrets once the publication works (@jpraynaud)
Ressources
Ngôn ngữ chính
Rust
Star
155
Fork
52
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/mithril

Tất cả issue của IntersectMBO/mithril

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.