mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-26 00:24:14 +00:00
custom release creator for beta versions (#6552)
This commit is contained in:
parent
8ea891f357
commit
ae1f39a76e
27
.github/workflows/github_release.yml
vendored
27
.github/workflows/github_release.yml
vendored
@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch: # this is useful to re-generate the release page without a new tag being pushed
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9].[0-9]+.[0-9]+*"
|
||||
- "v2.0.0-beta*"
|
||||
|
||||
jobs:
|
||||
generate-notes:
|
||||
@ -20,28 +20,15 @@ jobs:
|
||||
- name: Parse version
|
||||
id: version
|
||||
run: |
|
||||
echo "current_release=$(awk -F \- {'print $1'} < VERSION.txt)" >> "$GITHUB_OUTPUT"
|
||||
echo "current_pre_release=$(awk -F \- {'print $2'} < VERSION.txt)" >> "$GITHUB_OUTPUT"
|
||||
echo "current_release=$(awk -F \\- '{print $1}' < VERSION.txt)" >> "$GITHUB_OUTPUT"
|
||||
echo "current_pre_release=$(awk -F \\- '{print $2}' < VERSION.txt)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Install reno
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install "reno<5"
|
||||
|
||||
- name: Generate release notes for release candidates
|
||||
if: steps.version.outputs.current_pre_release != ''
|
||||
env:
|
||||
# When generating notes for release candidates, pick every vX.Y.Z-rcN but
|
||||
# stop when encounter vX.Y.Z-rc0. The -rc0 tag is added automatically when
|
||||
# we create the release branch, so we can assume it's always there.
|
||||
EARLIEST_VERSION: v${{ steps.version.outputs.current_release }}-rc0
|
||||
run: |
|
||||
reno report --no-show-source --ignore-cache --earliest-version $EARLIEST_VERSION -o relnotes.rst
|
||||
|
||||
- name: Generate release notes for the final release
|
||||
if: steps.version.outputs.current_pre_release == ''
|
||||
# When generating notes for the final release vX.Y.Z, we just pass --version and reno
|
||||
# will automatically collapse all the vX.Y.Z-rcN.
|
||||
- name: Generate release notes for beta versions
|
||||
run: |
|
||||
reno report --no-show-source --ignore-cache --version v${{ steps.version.outputs.current_release }} -o relnotes.rst
|
||||
|
||||
@ -53,3 +40,9 @@ jobs:
|
||||
- name: Debug
|
||||
run: |
|
||||
cat relnotes.md
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
bodyFile: "relnotes.md"
|
||||
prerelease: ${{ steps.version.outputs.current_pre_release }}
|
||||
allowUpdates: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user