forked from OpenBB-finance/OpenBB
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.44 KB
/
draft-release.yml
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
49
50
51
name: 📝 Draft release changelog
on:
workflow_dispatch:
inputs:
release_pr_number:
description: "Previous Release PR Number"
required: true
default: ""
tag:
description: "Tag for release (manual input)"
required: true
default: ""
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: 📟 Checkout code
uses: actions/checkout@v4
- name: 📝 Release Drafter
id: release-drafter
uses: release-drafter/[email protected]
# with:
# config-name: platform-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 💾 Save Changelog
run: |
cat << 'EOF' > CHANGELOG.md
${{ steps.release-drafter.outputs.body }}
EOF
- name: 🧬 Process Changelog
run: |
pip install requests openai
python .github/scripts/process_changelog.py CHANGELOG.md ${{ github.event.inputs.release_pr_number }}
python .github/scripts/summarize_changelog.py ${{ secrets.GITHUB_TOKEN }} ${{ secrets.OPENAI_API_KEY }}
cat CHANGELOG.md
- name: 🛫 Create Release
uses: mikepenz/action-gh-release@v1
with:
body_path: "CHANGELOG.md"
tag_name: ${{ github.event.inputs.tag }}
prerelease: false
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}