Commit 4eaa6d3
committed
refactor(ci): move GitHub release creation after smoke tests, auto-cleanup on failure
Move GitHub release creation from semantic-release to the publish job,
ensuring it only happens after smoke tests pass. If smoke tests fail,
automatically clean up the release commit and tag from GitHub.
Changes:
- Remove @semantic-release/github plugin from .releaserc.yml
- Extract version from pyproject.toml in release job and pass to
downstream jobs
- Add automatic cleanup in smoketest job if tests fail:
- Verify HEAD commit is the release commit (sanity check)
- Delete the release tag from remote
- Revert the release commit with force push
- Move GitHub release creation to publish job using --notes-from-tag
- Use default GITHUB_TOKEN for creating releases (app token only needed
for pushing to protected branch)
Benefits:
- GitHub releases only created after smoke tests pass
- Automatic cleanup if tests fail (no manual intervention needed)
- Simpler than preventing the tag/commit upfront
- Handles the common case (tests pass) with no changes to workflow time1 parent dcf1844 commit 4eaa6d3
2 files changed
Lines changed: 62 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
106 | | - | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
111 | | - | |
| 118 | + | |
112 | 119 | | |
113 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
118 | 133 | | |
119 | 134 | | |
120 | 135 | | |
121 | 136 | | |
122 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
127 | 169 | | |
128 | 170 | | |
129 | | - | |
130 | | - | |
| 171 | + | |
| 172 | + | |
131 | 173 | | |
132 | 174 | | |
133 | 175 | | |
134 | 176 | | |
135 | 177 | | |
136 | 178 | | |
137 | 179 | | |
| 180 | + | |
138 | 181 | | |
139 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
140 | 186 | | |
141 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
142 | 196 | | |
143 | 197 | | |
144 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
0 commit comments