Commit 28c1805
authored
🚀 [Feature]: Separate cleanup from release type and move ReleaseType to Publish.Module (#8)
The release type calculation is now separated from cleanup logic,
providing clearer control over when prereleases are cleaned up. The
`ReleaseType` now only has three values (`Release`, `Prerelease`, or
`None`), and cleanup is computed independently based on the
`AutoCleanup` setting.
- Part of PSModule/Process-PSModule#73
- Part of PSModule/Process-PSModule#265
## ReleaseType simplified to three values
Previously, `ReleaseType` could be set to `Cleanup` to trigger
prerelease cleanup. Now, `ReleaseType` only has three values: `Release`,
`Prerelease`, or `None`. The cleanup decision is computed separately
based on:
1. Whether you're in a cleanup scenario (merging to main or abandoning a
PR)
2. Whether `AutoCleanup` is enabled in your settings (defaults to
`true`)
This separation enables the abandoned PR cleanup scenario where a PR is
closed without merging—the workflow can now trigger cleanup
independently of whether a release is being created.
## ReleaseType moved to Publish.Module output
The computed `ReleaseType` value is now stored in
`Publish.Module.ReleaseType` rather than in the `Run` object. This
organizes release-related computed values alongside other publish
settings.
Workflows should now reference:
- `fromJson(inputs.Settings).Publish.Module.ReleaseType` for the release
type
- `fromJson(inputs.Settings).Publish.Module.AutoCleanup` for the cleanup
decision (computed boolean)
## AutoCleanup behavior
The `AutoCleanup` setting continues to work as before, but the output
value is now a computed boolean that indicates whether cleanup should
actually occur (based on both the setting and the current context like
merged PR or abandoned PR).1 parent 98ce7ab commit 28c1805
File tree
4 files changed
+32
-25
lines changed- scripts
- tests/scenarios
- invalid-percent-target
- valid
4 files changed
+32
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
180 | 189 | | |
181 | 190 | | |
182 | 191 | | |
| |||
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 344 | | |
341 | 345 | | |
342 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
241 | 237 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | 238 | | |
247 | 239 | | |
248 | 240 | | |
| |||
252 | 244 | | |
253 | 245 | | |
254 | 246 | | |
| 247 | + | |
255 | 248 | | |
256 | 249 | | |
257 | 250 | | |
258 | 251 | | |
| 252 | + | |
259 | 253 | | |
260 | 254 | | |
261 | 255 | | |
| |||
431 | 425 | | |
432 | 426 | | |
433 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| |||
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
450 | | - | |
451 | | - | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments