Skip to content

Commit 63dd721

Browse files
committed
Adding release notes action
1 parent a81ee10 commit 63dd721

File tree

4 files changed

+59
-12
lines changed

4 files changed

+59
-12
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Setup Ubuntu Runner Host'
2+
inputs:
3+
python-version:
4+
description: 'Python version to use'
5+
required: true
6+
default: '3.13'
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: setup python
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: ${{inputs.python-version}}
14+
cache: 'pip' # caching pip dependencies
15+
- name: Install dependencies
16+
shell: bash
17+
run: |
18+
sudo apt-get install libldap2-dev libsasl2-dev # Required for python-ldap
19+
pip install --upgrade pip
20+
pip install -r requirements.txt
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Preview Release Notes
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release-*
7+
pull_request:
8+
branches:
9+
- master
10+
- release-*
11+
12+
jobs:
13+
preview_release_notes:
14+
name: Preview Release Notes
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: '0'
21+
- name: Setup host
22+
uses: ./.github/actions/setup-ubuntu-host
23+
with:
24+
python-version: '${{ vars.PYTHON_VERSION }}'
25+
- name: Generate Release Notes
26+
id: generate_release_notes
27+
run: python -m scripts.release.release_notes -s $INITIAL_COMMIT_SHA -v $INITIAL_VERSION -o release_notes_tmp.md
28+
env:
29+
INITIAL_COMMIT_SHA: ${{ vars.RELEASE_INITIAL_COMMIT_SHA }}
30+
INITIAL_VERSION: ${{ vars.RELEASE_INITIAL_VERSION }}
31+
- name: Summarize results
32+
run: echo $(cat release_notes_tmp.md) >> $GITHUB_STEP_SUMMARY

.github/workflows/require_changelog.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,19 @@ on:
1111

1212
jobs:
1313
validate-changelog:
14+
name: Check for valid changelog entry in Pull Request
1415
runs-on: ubuntu-latest
1516
steps:
16-
- name: Check out repository code
17+
- name: Check out repository
1718
uses: actions/checkout@v4
1819
with:
1920
fetch-depth: '0'
20-
- name: setup python
21-
uses: actions/setup-python@v5
21+
- name: Setup host
22+
uses: ./.github/actions/setup-ubuntu-host
2223
with:
23-
python-version: 3.13 # Make this env var
24-
cache: 'pip' # caching pip dependencies
25-
- name: Install dependencies
26-
run: |
27-
sudo apt-get install libldap2-dev libsasl2-dev # Required for python-ldap
28-
pip install --upgrade pip
29-
pip install -r requirements.txt
24+
python-version: '${{ vars.PYTHON_VERSION }}'
3025
- name: Check if changelog entry file was added in this PR
31-
run: python -m scripts.release.check_changelog --base-sha "$BASE_SHA" --fail-on-no-changes $FAIL_ON_NO_CHANGES
26+
run: python -m scripts.release.check_changelog -b $BASE_SHA -f $FAIL_ON_NO_CHANGES >> $GITHUB_STEP_SUMMARY
3227
env:
3328
BASE_SHA: ${{ github.event.pull_request.base.sha }}
3429
FAIL_ON_NO_CHANGES: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }}

scripts/release/check_changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def str2bool(v):
4141
help=f"Path to the changelog directory relative to the repository root. Default is '{DEFAULT_CHANGELOG_PATH}'",
4242
)
4343
parser.add_argument(
44-
"-t",
44+
"-b",
4545
"--base-sha",
4646
metavar="",
4747
action="store",

0 commit comments

Comments
 (0)