Commit 592067a
authored
refactor: consolidate release pipeline with draft-first pattern (#124)
## What
Collapse the three separate release workflows (release.yaml, release-image.yaml, release-discussion.yaml) into a single release.yaml reusable workflow using a draft-first pattern: create draft, push tags, build artifacts (optional GoReleaser, optional Docker image), create discussion, then publish. Preserve the legacy release-image.yaml and release-discussion.yaml as stubs that fail with migration instructions.
## Why
The three workflows were always chained and shared data flow, so callers had to wire up three workflow calls and reason about ordering themselves. The draft-first sequence supports repositories with immutable releases enabled by ensuring every artifact and attestation lands before the release becomes visible.
## Notes
- Breaking: callers of release-image.yaml / release-discussion.yaml hit a deprecation error with migration instructions.
- Breaking: update-major-tag input removed; the major tag is always pushed in create_release.
- publish defaults to true and is backwards compatible, but release-drafter always creates a draft first and publish_release handles the final flip.
- publish_release uses always() with per-job result checks so it runs when optional jobs are skipped but blocks on any failure.
- GoReleaser config is validated via yq to require release.disable: true, avoiding conflict with the draft.
- Attestation steps probe repo visibility via the GitHub API and warn on private repos instead of failing cryptically.
- release_discussion always spins up a runner when a tag is created and skips at the step level if secrets are missing (job-level if: cannot read secrets).
- publish_release uses -F draft=false (capital F) to send a boolean rather than a string.
Signed-off-by: jmeridth <jmeridth@gmail.com>1 parent 84f2a3c commit 592067a
8 files changed
Lines changed: 486 additions & 176 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
30 | 26 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
37 | 28 | | |
38 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
39 | 32 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 34 | + | |
42 | 35 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments