Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,36 @@ jobs:
-Drevision="${VERSION}" \
-Dgpg.executable=gpg \
-Dgpg.keyname="${SIGNING_KEY_ID}"

github-release:
name: Create GitHub release from changelog
needs: release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout changelog
uses: actions/checkout@v5

- name: Create release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(awk -v ver="$VERSION" '
index($0, "## [" ver "]") == 1 { found = 1; next }
found && /^## \[/ { exit }
found { print }
' CHANGELOG.md)
HEADER="Released to Maven Central as net.openan.workflow.sdk:*:${VERSION}."
if [ -n "$NOTES" ]; then
BODY="${HEADER}

${NOTES}"
else
BODY="$HEADER"
fi
gh release create "${GITHUB_REF_NAME}" --verify-tag \
--title "${GITHUB_REF_NAME}" --notes "$BODY"