mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-11-29 11:49:58 +01:00
Add way to override changelog used for release (#53)
This commit is contained in:
parent
7efb286761
commit
3b8ebe9c6a
20
.github/workflows/release-tags.yml
vendored
20
.github/workflows/release-tags.yml
vendored
@ -76,12 +76,20 @@ jobs:
|
|||||||
if [[ "$SNAPSHOT" == "true" ]]; then
|
if [[ "$SNAPSHOT" == "true" ]]; then
|
||||||
PRERELEASE="--prerelease"
|
PRERELEASE="--prerelease"
|
||||||
fi
|
fi
|
||||||
export "CHANGELOG_FILE=$(mktemp --suffix=.md)"
|
CHANGELOG_OVERRIDE=".changelogs/${RELEASE_VERSION}.md"
|
||||||
echo "CHANGELOG_FILE=${CHANGELOG_FILE}" >> $GITHUB_ENV
|
if [[ -f "$CHANGELOG_OVERRIDE" ]]; then
|
||||||
gh api --method POST -H "Accept: application/vnd.github+json" \
|
echo "Using changelog override: $CHANGELOG_OVERRIDE"
|
||||||
"/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
|
export "CHANGELOG_FILE=$CHANGELOG_OVERRIDE"
|
||||||
-f tag_name="${RELEASE_VERSION}" \
|
echo "CHANGELOG_FILE=${CHANGELOG_FILE}" >> $GITHUB_ENV
|
||||||
--jq ".body" > "${CHANGELOG_FILE}"
|
else
|
||||||
|
echo "Generating changelog notes..."
|
||||||
|
export "CHANGELOG_FILE=$(mktemp --suffix=.md)"
|
||||||
|
echo "CHANGELOG_FILE=${CHANGELOG_FILE}" >> $GITHUB_ENV
|
||||||
|
gh api --method POST -H "Accept: application/vnd.github+json" \
|
||||||
|
"/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
|
||||||
|
-f tag_name="${RELEASE_VERSION}" \
|
||||||
|
--jq ".body" > "${CHANGELOG_FILE}"
|
||||||
|
fi
|
||||||
cat "${CHANGELOG_FILE}"
|
cat "${CHANGELOG_FILE}"
|
||||||
gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE ./build/libs/*.jar
|
gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE ./build/libs/*.jar
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user