-
Notifications
You must be signed in to change notification settings - Fork 1.2k
53 lines (43 loc) · 1.49 KB
/
generate-release-notes.yml
File metadata and controls
53 lines (43 loc) · 1.49 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
50
51
52
53
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: Fix GitHub CLI apt repo codename for noble (Ubuntu 24.04)
run: |
sudo sed -i 's/noble/jammy/g' /etc/apt/sources.list.d/archive_uri-https_cli_github_com_packages-noble.list || true
- 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 }}