Skip to content

Commit 8332a09

Browse files
authored
fix(ci): use workflow_dispatch for polish release notes (Fission-AI#533)
* fix(ci): use workflow_dispatch for polish release notes The claude-code-action doesn't support the `release` event type. Switch to workflow_dispatch which is supported, and have release-prepare trigger it after publishing. * fix: get tag from package.json instead of gh release list
1 parent d61a49f commit 8332a09

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

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

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

3-
# Automatically polish release notes when a release is published.
4-
# Also supports manual trigger as a fallback.
5-
#
6-
# Note: The Claude Code Action works with any GitHub event when using the
7-
# `prompt` parameter for custom automations. If release triggers stop working,
8-
# check https://github.com/anthropics/claude-code-action for updates.
3+
# Uses Claude to transform raw changelog into polished release notes.
4+
# Triggered automatically by release-prepare after publishing, or manually.
95
on:
10-
release:
11-
types: [published]
126
workflow_dispatch:
137
inputs:
148
tag_name:
@@ -17,7 +11,7 @@ on:
1711
type: string
1812

1913
env:
20-
TAG_NAME: ${{ github.event.release.tag_name || inputs.tag_name }}
14+
TAG_NAME: ${{ inputs.tag_name }}
2115

2216
permissions:
2317
contents: write

.github/workflows/release-prepare.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747

4848
# Opens/updates the Version Packages PR; publishes when the Version PR merges
4949
- name: Create/Update Version PR
50+
id: changesets
5051
uses: changesets/action@v1
5152
with:
5253
title: 'chore(release): version packages'
@@ -57,3 +58,14 @@ jobs:
5758
env:
5859
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
5960
# npm authentication handled via OIDC trusted publishing (no token needed)
61+
62+
# Trigger release notes polishing after a release is published
63+
- name: Polish release notes
64+
if: steps.changesets.outputs.published == 'true'
65+
env:
66+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
67+
run: |
68+
# Get version from package.json (just bumped by changesets)
69+
TAG="v$(jq -r .version package.json)"
70+
echo "Triggering polish workflow for $TAG"
71+
gh workflow run polish-release-notes.yml -f tag_name="$TAG"

0 commit comments

Comments
 (0)