Skip to content

Commit 0c8e261

Browse files
cicoylejavier-aliagaCopilot
authored
Create the release + release notes automatically (#1689)
* create the release + release notes automatically Signed-off-by: Cassandra Coyle <cassie@diagrid.io> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Cassie Coyle <cassie.i.coyle@gmail.com> * pr feedback Signed-off-by: Cassandra Coyle <cassie@diagrid.io> --------- Signed-off-by: Cassandra Coyle <cassie@diagrid.io> Signed-off-by: Cassie Coyle <cassie.i.coyle@gmail.com> Co-authored-by: Javier Aliaga <javier@diagrid.io> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8fda1c2 commit 0c8e261

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/create-release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,18 @@ jobs:
5353
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
5454
# Copy first to allow automation to use the latest version and not the release branch's version.
5555
cp -R ./.github/scripts ${RUNNER_TEMP}/
56-
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
56+
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
57+
- name: Create GitHub Release with auto-generated notes
58+
if: ${{ !endsWith(inputs.rel_version, '-SNAPSHOT') && !contains(inputs.rel_version, '-rc-') }}
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
61+
REL_VERSION: ${{ inputs.rel_version }}
62+
run: |
63+
# Normalize release version by stripping an optional leading 'v'
64+
REL_VERSION="${REL_VERSION#v}"
65+
TAG="v${REL_VERSION}"
66+
if gh release view "${TAG}" >/dev/null 2>&1; then
67+
echo "Release ${TAG} already exists, skipping creation."
68+
else
69+
gh release create "${TAG}" --generate-notes
70+
fi

0 commit comments

Comments
 (0)