Skip to content
Open
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
7 changes: 6 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
# Copy first to allow automation to use the latest version and not the release branch's version.
cp -R ./.github/scripts ${RUNNER_TEMP}/
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
- name: Create GitHub Release with auto-generated notes
if: ${{ !endsWith(inputs.rel_version, '-SNAPSHOT') && !contains(inputs.rel_version, '-rc-') }}
env:
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
run: gh release create "v${{ inputs.rel_version }}" --generate-notes
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

gh release create will error if a release for this tag already exists, which makes the workflow non-retriable after the release has been created once (e.g., if earlier steps need to be re-run). Consider adding a guard (e.g., gh release view <tag> and skip) or switching to an update flow (gh release edit) when the release already exists.

Suggested change
run: gh release create "v${{ inputs.rel_version }}" --generate-notes
run: |
if gh release view "v${{ inputs.rel_version }}" >/dev/null 2>&1; then
echo "Release v${{ inputs.rel_version }} already exists, skipping creation."
else
gh release create "v${{ inputs.rel_version }}" --generate-notes
fi

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

create-release.sh already normalizes the input by stripping an optional leading v and then creates/pushes the tag as v$REL_VERSION. This step always prefixes another v ("v${{ inputs.rel_version }}"), so if the dispatch input is provided as v1.9.1 (which the script currently accepts), the workflow will try to create a release for tag vv1.9.1 which won't exist and the step will fail. Consider normalizing the input in this step the same way (strip a leading v) or otherwise reusing the exact tag name used by the script.

Suggested change
run: gh release create "v${{ inputs.rel_version }}" --generate-notes
REL_VERSION: ${{ inputs.rel_version }}
run: |
# Normalize release version by stripping an optional leading 'v'
REL_VERSION="${REL_VERSION#v}"
TAG="v${REL_VERSION}"
gh release create "${TAG}" --generate-notes

Copilot uses AI. Check for mistakes.
Loading