Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
_extends: .github

# Override the template to include default tool versions
template: |
<!-- Optional: add a release summary here -->

## Default Clang Tools Versions for this release

- **clang-format**: `$CLANG_FORMAT_VERSION`
- **clang-tidy**: `$CLANG_TIDY_VERSION`

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)

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
40 changes: 39 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,42 @@ on:

jobs:
draft-release:
uses: cpp-linter/.github/.github/workflows/release-drafter.yml@main
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .

- name: Extract default tool versions
id: versions
run: |
CLANG_FORMAT_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_FORMAT_VERSION; print(DEFAULT_CLANG_FORMAT_VERSION)")
CLANG_TIDY_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_TIDY_VERSION; print(DEFAULT_CLANG_TIDY_VERSION)")
echo "CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION" >> $GITHUB_OUTPUT
echo "CLANG_TIDY_VERSION=$CLANG_TIDY_VERSION" >> $GITHUB_OUTPUT
echo "Default clang-format version: $CLANG_FORMAT_VERSION"
echo "Default clang-tidy version: $CLANG_TIDY_VERSION"

# Draft your next Release notes as Pull Requests are merged into the default branch
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
with:
commitish: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLANG_FORMAT_VERSION: ${{ steps.versions.outputs.CLANG_FORMAT_VERSION }}
CLANG_TIDY_VERSION: ${{ steps.versions.outputs.CLANG_TIDY_VERSION }}
Loading