Skip to content

Commit eacf43d

Browse files
authored
Updated release workflow (#517)
## What changes are proposed in this pull request? Updated the Release workflow. - Now it has correct path to the jars that are suppose to be uploaded to the release - It also automatically pulls the Next changelog info from the tag and uses them in the Release notes. ## How is this tested? N/A NO_CHANGELOG=true
1 parent e08f941 commit eacf43d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,24 @@ jobs:
5151
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
5252
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
5353

54+
- name: Write release notes to file
55+
run: |
56+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
57+
RELEASE_NOTES_DIR=/tmp/release-notes
58+
mkdir -p "$RELEASE_NOTES_DIR"
59+
RELEASE_NOTES_FILE="$RELEASE_NOTES_DIR/release-notes.md"
60+
git for-each-ref --format='%(body)' ${{ github.ref }} > "$RELEASE_NOTES_FILE"
61+
echo "Release notes file: $RELEASE_NOTES_FILE"
62+
echo "Release notes contents:"
63+
cat "$RELEASE_NOTES_FILE"
64+
else
65+
echo "Not a release tag, skipping release notes"
66+
fi
67+
5468
# This step also runs ONLY on tag pushes (real release)
5569
- name: Create GitHub release
5670
if: "startsWith(github.ref, 'refs/tags/')"
5771
uses: softprops/action-gh-release@v1
5872
with:
59-
files: target/*.jar
73+
files: databricks-sdk-java/target/*.jar
74+
body_path: /tmp/release-notes/release-notes.md

0 commit comments

Comments
 (0)