forked from deepset-ai/haystack
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.43 KB
/
github_release.yml
File metadata and controls
48 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Project release on Github
on:
workflow_dispatch: # this is useful to re-generate the release page without a new tag being pushed
push:
tags:
- "v2.0.0-beta*"
jobs:
generate-notes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0 # slow but needed by reno
- 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"
- name: Install reno
run: |
python -m pip install --upgrade pip
pip install "reno<5"
- name: Generate release notes for beta versions
run: |
reno report --no-show-source --ignore-cache --version v${{ steps.version.outputs.current_release }}-${{ steps.version.outputs.current_pre_release }} -o relnotes.rst
- name: Convert to Markdown
uses: docker://pandoc/core:3.1
with:
args: "--from rst --to markdown_github --no-highlight relnotes.rst -o relnotes.md --wrap=none"
- name: Debug
run: |
cat relnotes.md
- uses: ncipollo/release-action@v1
with:
bodyFile: "relnotes.md"
prerelease: ${{ steps.version.outputs.current_pre_release }}
allowUpdates: true