fix: generate release notes from the previous release on the line (#31080)
This commit is contained in:
@@ -125,6 +125,8 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -140,14 +142,24 @@ jobs:
|
|||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
TAG: ${{ needs.tag.outputs.version }}
|
TAG: ${{ needs.tag.outputs.version }}
|
||||||
PRERELEASE: ${{ needs.tag.outputs.rc }}
|
PRERELEASE: ${{ needs.tag.outputs.rc }}
|
||||||
|
BRANCH: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
|
exclude=()
|
||||||
|
if [[ "${PRERELEASE}" != 'true' ]]; then
|
||||||
|
exclude=(--exclude '*-rc*')
|
||||||
|
fi
|
||||||
|
previous=$(git describe --tags --abbrev=0 --match 'v*' "${exclude[@]}" --exclude "${TAG}" HEAD)
|
||||||
|
echo "generating notes from ${previous}"
|
||||||
|
|
||||||
gh release create "${TAG}" \
|
gh release create "${TAG}" \
|
||||||
--repo "${REPO}" \
|
--repo "${REPO}" \
|
||||||
|
--target "${BRANCH}" \
|
||||||
--draft \
|
--draft \
|
||||||
--verify-tag \
|
--verify-tag \
|
||||||
--prerelease="${PRERELEASE}" \
|
--prerelease="${PRERELEASE}" \
|
||||||
--notes-file misc/release/notes.tmpl \
|
--notes-file misc/release/notes.tmpl \
|
||||||
--generate-notes \
|
--generate-notes \
|
||||||
|
--notes-start-tag "${previous}" \
|
||||||
docker/docker-compose.yml \
|
docker/docker-compose.yml \
|
||||||
docker/docker-compose.rootless.yml \
|
docker/docker-compose.rootless.yml \
|
||||||
docker/example.env \
|
docker/example.env \
|
||||||
|
|||||||
Reference in New Issue
Block a user