fix: update Release Drafter configuration (#120) #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Drafter | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
draft-release: | |
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 }} |