Commit 28ca7b7
Add make tag target for GitHub release (#334)
## Summary
- Add `wf/tag-release.sh` that reads the current `version` from
`build.gradle`, extracts the matching `## [x.y.z]` section from
`CHANGELOG.md`, creates an annotated git tag, pushes it, and runs `gh
release create` with those notes.
- Wire it up as `make tag`.
Complements `make release` (publishes to the Nextflow Plugin Registry)
by handling the separate GitHub-release step.
## Test plan
- [x] Verified the awk CHANGELOG extraction returns the 1.0.1 bullets
- [ ] Run `make tag` after merge to cut the 1.0.1 GitHub release
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR adds `wf/tag-release.sh` (wired as `make tag`) which reads the
version from `build.gradle`, extracts the matching `CHANGELOG.md`
section, creates an annotated git tag, pushes it, and calls `gh release
create`.
- **Partial-failure gap (P1):** `git push origin "$VERSION"` runs before
`gh release create`. If the GitHub release step fails (auth error,
release already exists, network timeout), the tag is already live on the
remote but no release is attached. The "tag already exists" guard then
prevents any re-run, leaving the repo in a half-released state without
rollback.
<h3>Confidence Score: 3/5</h3>
Needs the partial-failure rollback fixed before running in production;
the remaining issues are minor.
One P1 (tag pushed without rollback on release-creation failure) plus
three P2s (ref scoping, awk dot escaping, whitespace check) pulls the
score below the P1 ceiling of 4.
wf/tag-release.sh — specifically lines 30-33 around tag push / release
create ordering
<h3>Important Files Changed</h3>
| Filename | Overview |
|----------|----------|
| wf/tag-release.sh | New script to tag and publish a GitHub release;
has a P1 partial-failure risk (tag pushed before release creation, no
rollback), plus P2 issues with ref scoping, awk regex dot escaping, and
incomplete whitespace trimming. |
| Makefile | Adds `tag` to .PHONY and wires it to `wf/tag-release.sh`;
straightforward and correct. |
</details>
<h3>Sequence Diagram</h3>
```mermaid
sequenceDiagram
participant Dev as Developer
participant Script as tag-release.sh
participant FS as Filesystem
participant Git as Git (local+remote)
participant GH as GitHub Releases
Dev->>Script: make tag
Script->>FS: grep version from build.gradle
FS-->>Script: VERSION
Script->>Git: git rev-parse refs/tags/VERSION
Git-->>Script: not found → proceed
Script->>FS: awk extract CHANGELOG section
FS-->>Script: NOTES
Script->>Git: git tag -a VERSION
Script->>Git: git push origin VERSION
Git-->>Script: tag pushed ✓
Script->>GH: gh release create VERSION --notes NOTES
GH-->>Script: release created ✓ (or ✗ → tag stranded)
Script->>Dev: echo "Tagged and released VERSION"
```
<sub>Reviews (1): Last reviewed commit: ["Make release depend on
tag"](539ab28)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=30405953)</sub>
> Greptile also left **4 inline comments** on this PR.
<!-- /greptile_comment -->
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9cf5d68 commit 28ca7b7
3 files changed
Lines changed: 78 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 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 | + | |
0 commit comments