From 3c3abedbde4412bbddceadc11a6165011fe68a72 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:15:32 -0400 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 26 -------------------------- .github/workflows/release.yml | 21 +++------------------ .releaserc.json | 1 - 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff12bd80..2f40a32e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -253,8 +253,6 @@ jobs: cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: write - outputs: - tag: ${{ steps.release-check.outputs.tag }} steps: - name: Generate app token id: app-token @@ -275,31 +273,7 @@ jobs: - name: Install semantic-release run: npm install -g semantic-release@25.0.3 @semantic-release/exec@7.1.0 @semantic-release/git@10.0.1 - - name: Save pre-release version - id: pre - run: echo "version=$(cat VERSION 2>/dev/null)" >> "$GITHUB_OUTPUT" - - name: Run semantic-release run: npx semantic-release ${{ github.event_name == 'pull_request' && '--dry-run' || '' }} env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - - - name: Check for new release - id: release-check - run: | - NEW_VERSION=$(cat VERSION) - if [ "$NEW_VERSION" != "${{ steps.pre.outputs.version }}" ]; then - echo "tag=v${NEW_VERSION}" >> "$GITHUB_OUTPUT" - fi - - release: - name: Release Artifacts - needs: [semantic-release] - if: needs.semantic-release.outputs.tag != '' - permissions: - contents: write - packages: write - uses: ./.github/workflows/release.yml - with: - tag: ${{ needs.semantic-release.outputs.tag }} - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff367b9d..143b65d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,18 +4,8 @@ name: Release Artifacts on: - workflow_call: - inputs: - tag: - description: "Release tag (e.g. v1.75.0)" - required: true - type: string - workflow_dispatch: - inputs: - tag: - description: "Release tag (e.g. v1.75.0)" - required: true - type: string + release: + types: [published] concurrency: group: release-artifacts @@ -37,7 +27,7 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - ref: ${{ inputs.tag }} + ref: ${{ github.event.release.tag_name }} fetch-depth: 0 persist-credentials: false @@ -62,11 +52,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release edit "${{ inputs.tag }}" --draft=false - - name: Clean up untagged GHCR images env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json index b86f767a..500bf773 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -11,7 +11,6 @@ "message": "chore(release): ${nextRelease.version} [skip ci]" }], ["@semantic-release/github", { - "draftRelease": true, "successComment": false, "failComment": false }]