-
Notifications
You must be signed in to change notification settings - Fork 227
Create the release + release notes automatically #1689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||||||||
|
||||||||||||||||
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh release createwill 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.