Skip to content

Commit 3c3abed

Browse files
cpcloudclaude
andcommitted
fix(ci): revert to non-draft releases to preserve release notes
semantic-release creates the GitHub release with notes, so making it a draft and then publishing separately loses the notes. Trigger the release workflow on the `release: created` event instead of calling it directly from CI, and remove the draft/publish dance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 38c4720 commit 3c3abed

3 files changed

Lines changed: 3 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ jobs:
253253
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
254254
permissions:
255255
contents: write
256-
outputs:
257-
tag: ${{ steps.release-check.outputs.tag }}
258256
steps:
259257
- name: Generate app token
260258
id: app-token
@@ -275,31 +273,7 @@ jobs:
275273
- name: Install semantic-release
276274
run: npm install -g semantic-release@25.0.3 @semantic-release/exec@7.1.0 @semantic-release/git@10.0.1
277275

278-
- name: Save pre-release version
279-
id: pre
280-
run: echo "version=$(cat VERSION 2>/dev/null)" >> "$GITHUB_OUTPUT"
281-
282276
- name: Run semantic-release
283277
run: npx semantic-release ${{ github.event_name == 'pull_request' && '--dry-run' || '' }}
284278
env:
285279
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
286-
287-
- name: Check for new release
288-
id: release-check
289-
run: |
290-
NEW_VERSION=$(cat VERSION)
291-
if [ "$NEW_VERSION" != "${{ steps.pre.outputs.version }}" ]; then
292-
echo "tag=v${NEW_VERSION}" >> "$GITHUB_OUTPUT"
293-
fi
294-
295-
release:
296-
name: Release Artifacts
297-
needs: [semantic-release]
298-
if: needs.semantic-release.outputs.tag != ''
299-
permissions:
300-
contents: write
301-
packages: write
302-
uses: ./.github/workflows/release.yml
303-
with:
304-
tag: ${{ needs.semantic-release.outputs.tag }}
305-
secrets: inherit

.github/workflows/release.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@
44
name: Release Artifacts
55

66
on:
7-
workflow_call:
8-
inputs:
9-
tag:
10-
description: "Release tag (e.g. v1.75.0)"
11-
required: true
12-
type: string
13-
workflow_dispatch:
14-
inputs:
15-
tag:
16-
description: "Release tag (e.g. v1.75.0)"
17-
required: true
18-
type: string
7+
release:
8+
types: [published]
199

2010
concurrency:
2111
group: release-artifacts
@@ -37,7 +27,7 @@ jobs:
3727
steps:
3828
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3929
with:
40-
ref: ${{ inputs.tag }}
30+
ref: ${{ github.event.release.tag_name }}
4131
fetch-depth: 0
4232
persist-credentials: false
4333

@@ -62,11 +52,6 @@ jobs:
6252
env:
6353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6454

65-
- name: Publish release
66-
env:
67-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
run: gh release edit "${{ inputs.tag }}" --draft=false
69-
7055
- name: Clean up untagged GHCR images
7156
env:
7257
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"message": "chore(release): ${nextRelease.version} [skip ci]"
1212
}],
1313
["@semantic-release/github", {
14-
"draftRelease": true,
1514
"successComment": false,
1615
"failComment": false
1716
}]

0 commit comments

Comments
 (0)