Skip to content

Commit a44c11e

Browse files
authored
Merge branch 'main' into dependabot/pip/pip-f497b76858
2 parents 2c67c65 + 8649224 commit a44c11e

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.github/release-drafter.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
12
_extends: .github
3+
4+
# Override the template to include default tool versions
5+
template: |
6+
<!-- Optional: add a release summary here -->
7+
8+
## Default Clang Tools Versions for this release
9+
10+
- **clang-format**: `$CLANG_FORMAT_VERSION`
11+
- **clang-tidy**: `$CLANG_TIDY_VERSION`
12+
13+
You can override the default versions by adding the `--version` argument under `args` in your pre-commit configuration. For details, see [Custom Clang Tool Version](https://github.com/cpp-linter/cpp-linter-hooks?tab=readme-ov-file#custom-clang-tool-version)
14+
15+
$CHANGES
16+
17+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

.github/workflows/release-drafter.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,42 @@ on:
88

99
jobs:
1010
draft-release:
11-
uses: cpp-linter/.github/.github/workflows/release-drafter.yml@main
11+
permissions:
12+
# write permission is required to create a github release
13+
contents: write
14+
# write permission is required for autolabeler
15+
# otherwise, read permission is required at least
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install -e .
31+
32+
- name: Extract default tool versions
33+
id: versions
34+
run: |
35+
CLANG_FORMAT_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_FORMAT_VERSION; print(DEFAULT_CLANG_FORMAT_VERSION)")
36+
CLANG_TIDY_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_TIDY_VERSION; print(DEFAULT_CLANG_TIDY_VERSION)")
37+
echo "CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION" >> $GITHUB_OUTPUT
38+
echo "CLANG_TIDY_VERSION=$CLANG_TIDY_VERSION" >> $GITHUB_OUTPUT
39+
echo "Default clang-format version: $CLANG_FORMAT_VERSION"
40+
echo "Default clang-tidy version: $CLANG_TIDY_VERSION"
41+
42+
# Draft your next Release notes as Pull Requests are merged into the default branch
43+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
44+
with:
45+
commitish: 'main'
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
CLANG_FORMAT_VERSION: ${{ steps.versions.outputs.CLANG_FORMAT_VERSION }}
49+
CLANG_TIDY_VERSION: ${{ steps.versions.outputs.CLANG_TIDY_VERSION }}

0 commit comments

Comments
 (0)