Skip to content

Commit c57e421

Browse files
authored
fix: update polish-release-notes workflow to use correct Claude Code action parameters (Fission-AI#504)
The workflow was failing due to two issues: 1. Using unsupported 'release' event trigger - Claude Code action doesn't support this event type 2. Using deprecated 'direct_prompt' parameter instead of 'prompt' Changes: - Switch from 'release' trigger to 'workflow_dispatch' for manual triggering - Replace 'direct_prompt' with 'prompt' parameter (v1.0 breaking change) - Update all tag references from github.event.release.tag_name to inputs.tag_name The workflow now needs to be manually triggered from GitHub Actions UI after a release is published.
1 parent ed2e832 commit c57e421

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/polish-release-notes.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: Polish Release Notes
22

3-
# Triggers when changesets creates a release
3+
# Manual trigger after a release is published
4+
# The Claude Code action doesn't support 'release' event triggers directly
45
on:
5-
release:
6-
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag_name:
9+
description: 'Release tag to polish (e.g., v0.18.0)'
10+
required: true
11+
type: string
712

813
permissions:
914
contents: write
@@ -22,17 +27,17 @@ jobs:
2227
env:
2328
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2429
run: |
25-
gh release view "${{ github.event.release.tag_name }}" --json body -q '.body' > current-notes.md
26-
echo "Fetched release notes for ${{ github.event.release.tag_name }}"
30+
gh release view "${{ inputs.tag_name }}" --json body -q '.body' > current-notes.md
31+
echo "Fetched release notes for ${{ inputs.tag_name }}"
2732
2833
- name: Transform release notes with Claude
2934
uses: anthropics/claude-code-action@v1
3035
id: claude
3136
with:
3237
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3338
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
direct_prompt: |
35-
Transform the changelog in `current-notes.md` into release notes for OpenSpec ${{ github.event.release.tag_name }}.
39+
prompt: |
40+
Transform the changelog in `current-notes.md` into release notes for OpenSpec ${{ inputs.tag_name }}.
3641
3742
## Voice
3843
@@ -49,7 +54,7 @@ jobs:
4954
5055
A short title in this format:
5156
```
52-
${{ github.event.release.tag_name }} - [1-4 words describing the release]
57+
${{ inputs.tag_name }} - [1-4 words describing the release]
5358
```
5459
5560
Examples:
@@ -66,7 +71,7 @@ jobs:
6671
### 2. `polished-notes.md`
6772
6873
```markdown
69-
## What's New in ${{ github.event.release.tag_name }}
74+
## What's New in ${{ inputs.tag_name }}
7075
7176
[One sentence: what's the theme of this release?]
7277
@@ -123,7 +128,7 @@ jobs:
123128
env:
124129
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125130
run: |
126-
TAG="${{ github.event.release.tag_name }}"
131+
TAG="${{ inputs.tag_name }}"
127132
128133
if [ -f "polished-notes.md" ] && [ -f "release-title.txt" ]; then
129134
TITLE=$(cat release-title.txt)

0 commit comments

Comments
 (0)