Skip to content

Commit 25f46bc

Browse files
lostindarkCopilot
andcommitted
fix: trigger release highlights from release workflow with version
Instead of using workflow_run (which has contents:read and can't see draft releases), the Release workflow now triggers Release Highlights via workflow_dispatch passing the version tag. The highlights workflow uses the tag directly instead of searching for drafts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 304a1b1 commit 25f46bc

File tree

3 files changed

+42
-83
lines changed

3 files changed

+42
-83
lines changed

.github/workflows/release-highlights.lock.yml

Lines changed: 25 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release-highlights.md

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Release Highlights
33
description: Generate AI-powered release highlights and prepend to draft release
44
on:
55
workflow_dispatch:
6-
workflow_run:
7-
workflows: ["Release"]
8-
types: [completed]
9-
branches:
10-
- master
6+
inputs:
7+
version:
8+
description: 'Release version tag (e.g. v1.0.0)'
9+
required: true
10+
type: string
1111
permissions:
1212
contents: read
1313
pull-requests: read
@@ -18,33 +18,23 @@ network:
1818
- defaults
1919
safe-outputs:
2020
update-release:
21-
steps:
22-
- name: Check workflow conclusion
23-
env:
24-
WORKFLOW_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
25-
run: |
26-
# Only proceed if the triggering workflow succeeded (skip check for manual dispatch)
27-
if [ -n "$WORKFLOW_CONCLUSION" ] && [ "$WORKFLOW_CONCLUSION" != "success" ]; then
28-
echo "Release workflow did not succeed. Skipping."
29-
exit 1
30-
fi
3121
---
3222

3323
# Release Highlights Generator
3424

35-
Generate an engaging release highlights summary for **${{ github.repository }}**.
25+
Generate an engaging release highlights summary for **${{ github.repository }}** release `${{ inputs.version }}`.
3626

3727
## Workflow
3828

3929
### 1. Gather Release Data
4030

41-
Use the GitHub MCP tools to fetch release information:
31+
Use the GitHub MCP tools to fetch release information for `${{ github.repository }}`:
4232

43-
1. **Find the latest draft release**List releases for `${{ github.repository }}` and find the first draft release. If no draft release exists, call `safeoutputs/noop(message="No draft release found")` and stop.
33+
1. **Get the draft release**Get the release for tag `${{ inputs.version }}`. This is the draft release to update.
4434

45-
2. **Find the previous published release**From the same releases list, find the most recent non-draft release. Note its tag name.
35+
2. **Find the previous published release**List releases and find the most recent non-draft, published release before `${{ inputs.version }}`. Note its tag name.
4636

47-
3. **Get commits between releases**Use the GitHub MCP tools to compare the previous release tag with the draft release tag to get the list of commits.
37+
3. **Get commits between releases**Compare the previous release tag with `${{ inputs.version }}` to get the list of commits.
4838

4939
4. **Get merged PRs** — Search for merged pull requests in the repository between the two releases.
5040

@@ -107,7 +97,7 @@ Dependency updates and internal improvements to keep things running smoothly.
10797
**✅ CORRECT - Call the MCP tool directly:**
10898
```
10999
safeoutputs/update_release(
110-
tag="<draft release tag>",
100+
tag="${{ inputs.version }}",
111101
operation="prepend",
112102
body="## 🌟 Release Highlights\n\n[Your complete markdown highlights here]"
113103
)

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ jobs:
7272
--title "DriverStore Explorer v${{ inputs.version }}" `
7373
--generate-notes `
7474
--draft
75+
76+
- name: Trigger release highlights
77+
env:
78+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
run: |
80+
gh workflow run release-highlights.lock.yml -f version="v${{ inputs.version }}"

0 commit comments

Comments
 (0)