You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Static API token in repository secrets](#static-api-token-in-repository-secrets)
22
22
-[Use with the RubyGems CLI](#use-with-the-rubygems-cli)
23
23
-[License Summary](#license-summary)
24
24
-[Security Disclosures](#security-disclosures)
@@ -27,11 +27,39 @@ and exports environment variables used by both `rubygems` and
27
27
28
28
## Usage
29
29
30
-
We recommend that
31
-
you use GitHub's OIDC provider in conjunction with a configured
32
-
RubyGems OIDC API Key Role.
30
+
There are three ways to configure RubyGems credentials:
33
31
34
-
To do that, you would add the following step to your workflow:
32
+
1.**Trusted Publisher (recommended)**: Uses OIDC without any API tokens or secrets.
33
+
2.**OIDC API Key Role**: Uses OIDC with a pre-configured API Key Role on RubyGems.org.
34
+
3.**Static API token**: Uses a RubyGems API token stored in repository secrets.
35
+
36
+
> **Note**: The OIDC-based configurations (**Trusted Publisher** and **OIDC API Key Role**) require the `id-token: write` permission in your workflow, for example:
37
+
>
38
+
> ```yaml
39
+
> permissions:
40
+
> id-token: write
41
+
> contents: read
42
+
> ```
43
+
44
+
### Trusted Publisher (recommended)
45
+
46
+
The simplest approach is to use [Trusted Publishing](https://guides.rubygems.org/trusted-publishing/).
47
+
Configure a trusted publisher for your gem on RubyGems.org, then use:
0 commit comments