Commit 861d7af
committed
ci(release): run changelog extraction in build job to gate PyPI publish
Move the AWK-based changelog extraction from the post-publish
github-release job into the build job, so a missing or unrenamed
"## Unreleased" entry fails before any PyPI upload runs. Previously the
extraction lived after publish-to-pypi, meaning a forgotten rename
would happily ship the package and only then fail when trying to build
a GitHub Release — a state that required manual cleanup.
Since publish-to-pypi and publish-to-testpypi both depend on build,
failing the new step transitively blocks every downstream job. No
changes are needed in the PyPI jobs themselves.
Changes:
- build job gets two gated steps (if: startsWith(github.ref, 'refs/tags/')):
"Extract changelog for tagged release" (runs AWK against CHANGELOG.md,
fails fast on empty output) and "Upload release notes" (publishes
release-notes.md as a dedicated artifact).
- github-release job drops the checkout step (no longer needs
CHANGELOG.md on disk) and the duplicate extract step, and adds a
"Download release notes" step to consume the new artifact.
- The gh release create invocation is unchanged —
--notes-file release-notes.md works the same regardless of where the
file comes from.1 parent 1a86942 commit 861d7af
1 file changed
Lines changed: 27 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
32 | 55 | | |
33 | 56 | | |
34 | 57 | | |
| |||
64 | 87 | | |
65 | 88 | | |
66 | 89 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 90 | | |
72 | 91 | | |
73 | 92 | | |
74 | 93 | | |
75 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
76 | 99 | | |
77 | 100 | | |
78 | 101 | | |
79 | 102 | | |
80 | 103 | | |
81 | 104 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| |||
0 commit comments