Commit b1899c8
authored
feat: allow publishing via OIDC authentication (#2)
This is required by npm since 2026. npm publish automatically grabs the
correct environment variables for OIDC, but aspublish prior to this
change would've bailed prematurely due to it expecting a token to exist.
Here are some references to look at:
* https://docs.npmjs.com/trusted-publishers#github-actions-configuration
* https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-pypi
OIDC is enabled for a package by setting the GitHub repo as the trusted
publisher in the npm website, removing the NPM_TOKEN secret, and adding
`id-token: write` under `permissions` in the Actions workflow.1 parent 47096be commit b1899c8
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
259 | | - | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
0 commit comments