-
Notifications
You must be signed in to change notification settings - Fork 1.2k
49 lines (40 loc) · 1.28 KB
/
generate-release-notes.yml
File metadata and controls
49 lines (40 loc) · 1.28 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
49
name: Generate and Publish Release Notes
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
# tags:
# - 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.12
- name: Install dependencies
run: pip install requests
- name: Generate release notes
run: python .github/scripts/generate_release_notes.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
- name: Install GitHub CLI
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install -y gh
- name: Authenticate GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Create GitHub Release
run: gh release create ${{ github.ref_name }} -F release_notes.md --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}