Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,11 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-notes:
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release-notes job will run even when the release job is skipped due to the condition if: startsWith(github.ref, 'refs/tags/'). When triggered by workflow_dispatch without a tag (where github.ref would be a branch), the release job will be skipped, but release-notes will still attempt to run and call the release-notes-generator workflow.

Consider adding the same condition to the release-notes job:

release-notes:
  if: startsWith(github.ref, 'refs/tags/')
  needs: release
  uses: ./.github/workflows/release-notes-generator.yml
  with:
    tag: ${{ github.ref_name }}
  secrets: inherit
Suggested change
release-notes:
release-notes:
if: startsWith(github.ref, 'refs/tags/')

Copilot uses AI. Check for mistakes.
if: startsWith(github.ref, 'refs/tags/')
needs: release
uses: ./.github/workflows/release-notes-generator.yml
with:
tag: ${{ github.ref_name }}
secrets: inherit
17 changes: 13 additions & 4 deletions .github/workflows/release-notes-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Generate Release Notes

on:
release:
types: [published, prereleased, released, created]
types: [published, prereleased, created]
workflow_dispatch:
workflow_call:
inputs:
tag:
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The tag input is missing a description field. While not strictly required, adding a description improves workflow documentation and helps users understand the input's purpose.

Consider adding:

workflow_call:
  inputs:
    tag:
      description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.'
      required: false
      type: string
Suggested change
tag:
tag:
description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.'

Copilot uses AI. Check for mistakes.
description: 'Release tag to generate notes for. If not provided, uses the release event tag or the most recent tag.'
required: false
type: string

permissions:
contents: write
Expand Down Expand Up @@ -42,10 +48,13 @@ jobs:
run: |
set -euo pipefail

if [[ "${{ github.event_name }}" == "release" ]]; then
TAG_NAME="${{ inputs.tag }}"
if [[ -z "${TAG_NAME}" && "${{ github.event_name }}" == "release" ]]; then
TAG_NAME="${{ github.event.release.tag_name }}"
else
# workflow_dispatch - use most recent tag by creation date
fi

# Fallback to most recent tag for workflow_call, workflow_dispatch, or any other trigger
if [[ -z "${TAG_NAME}" ]]; then
TAG_NAME="$(git tag --sort=-creatordate | head -n 1 || true)"
fi

Expand Down