Commit 562baff
authored
fix release: migrate npm publish to OIDC trusted publishing (#197)
* fix release: migrate npm publish to OIDC trusted publishing
The 2.1.0 release never reached npm: the release job created the git
tag before publishing, so ncipollo/release-action failed with
422 already_exists (tag_name) and the job aborted before npm publish
ran. npm is still stuck at 2.0.0.
Align the workflow with react-apple-signin-auth's working setup:
- migrate to npm OIDC trusted publishing (id-token: write, bare
npm publish, drop NODE_AUTH_TOKEN/NPM_TOKEN)
- bump Node to 24.x (ships npm >= 11.5.1, required for OIDC)
- guard the GitHub release and npm publish on whether the version
tag already exists (check_tag), so re-runs no longer fail
- fetch-depth: 0 and multiline COMMIT_LOG for correct changelogs
- scope triggers to main pushes + PRs, add workflow_dispatch
- remove obsolete CircleCI config (no longer used)
* address review: least-privilege perms, decoupled recovery gates
- move contents/id-token write to the publish job; default read-only
- gate npm publish on npm version existence and GitHub release on
release existence (decoupled), so reruns recover when a tag/release
exists but the npm version is missing (the #196 failure mode),
matching the pattern in pi-autoresearch/turbovector
- pin the release tag to the built commit (github.sha) instead of main
- scope pull_request trigger to main; add concurrency guard
* review: clarify package-metadata step quoting
Capture version/name into variables with single-quoted node -e args
instead of nested double quotes. Functionally equivalent (bash $()
handles nested quotes) but clearer and matches the pi-autoresearch idiom.1 parent e016197 commit 562baff
2 files changed
Lines changed: 63 additions & 51 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
| 10 | + | |
5 | 11 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
| |||
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
23 | | - | |
| 31 | + | |
24 | 32 | | |
25 | | - | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | | - | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | | - | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| |||
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 58 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
| 64 | + | |
60 | 65 | | |
61 | | - | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | | - | |
65 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
66 | 86 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
74 | 105 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
79 | 109 | | |
80 | | - | |
81 | | - | |
82 | | - | |
| 110 | + | |
| 111 | + | |
0 commit comments