Skip to content

Commit f4ec15e

Browse files
committed
Fix release notes diff in github release actions
1 parent 5560012 commit f4ec15e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ jobs:
2323
steps:
2424
- name: "Create release output"
2525
run: echo '🎬 Release process for version ${{ env.RELEASE_VERSION }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
26-
26+
2727
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
2828
with:
2929
app_id: ${{ vars.APP_ID }}
3030
private_key: ${{ secrets.APP_PRIVATE_KEY }}
31+
fetch-depth: 0
3132

3233
- name: "Store version numbers in env variables"
3334
# The awk command to increase the version number was copied from
@@ -43,6 +44,7 @@ jobs:
4344
# Example: 5.2.0 => 5.2.x
4445
# Example: 5.2.0-beta1 => <current branch>
4546
run: |
47+
echo CURRENT_TAG=$(git describe --tags --abbrev=0) >> $GITHUB_ENV
4648
echo RELEASE_VERSION=${{ inputs.version }} >> $GITHUB_ENV
4749
echo RELEASE_VERSION_WITHOUT_SUFFIX=$(echo ${{ inputs.version }} | awk -F- '{print $1}') >> $GITHUB_ENV
4850
if [[ "${{ inputs.version }}" =~ (alpha|beta|rc)[0-9]+$ ]]; then
@@ -130,6 +132,7 @@ jobs:
130132
--target ${{ env.RELEASE_BRANCH }} \
131133
--title "Java Driver ${{ env.RELEASE_VERSION }} ($(date '+%B %d, %Y'))" \
132134
--generate-notes \
135+
--notes-start-tag "${{ env.CURRENT_TAG }}" \
133136
--draft\
134137
)" >> "$GITHUB_ENV"
135138

0 commit comments

Comments
 (0)