Skip to content

Update CMake

Update CMake #49

Workflow file for this run

name: Update CMake
on:
pull_request:
paths:
- '.github/workflows/update-cmake.yml'
- 'scripts/update_cmake_version.py'
- 'noxfile.py'
workflow_dispatch:
schedule:
- cron: '0 6 * * *' # "At 06:00 every day."
jobs:
update-cmake:
name: Update CMake
if: github.repository_owner == 'scikit-build' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wntrblm/nox@2024.04.15
- name: "Run update: bump CMake"
id: bump-cmake
run: |
nox --force-color -s bump
echo "version=$(nox -s cmake_version 2>/dev/null)" >> $GITHUB_OUTPUT
- run: echo "CMake version is ${{ steps.bump-cmake.outputs.version }}"
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
# run the GHA tests.
- uses: actions/create-github-app-token@v1
id: app-token
if: github.ref == 'refs/heads/main' && github.repository == 'scikit-build/cmake-python-distributions'
with:
app-id: ${{ secrets.SCIKIT_BUILD_BOT_APP_ID }}
private-key: ${{ secrets.SCIKIT_BUILD_BOT_APP_PRIVATE_KEY }}
- name: Create Pull Request
if: github.ref == 'refs/heads/main' && github.repository == 'scikit-build/cmake-python-distributions'
uses: peter-evans/create-pull-request@v6
with:
commit-message: '[Bot] Update to CMake ${{ steps.bump-cmake.outputs.version }}'
title: '[Bot] Update to CMake ${{ steps.bump-cmake.outputs.version }}'
body: |
Created by update_cmake_version.py
PR generated by "Update CMake" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
branch: update-cmake-pr
committer: "scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com>"
author: "scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com>"
token: ${{ steps.app-token.outputs.token }}
delete-branch: true