diff --git a/.github/workflows/ci-scriv-entries.yml b/.github/workflows/ci-scriv-entries.yml new file mode 100644 index 0000000..8e30f1e --- /dev/null +++ b/.github/workflows/ci-scriv-entries.yml @@ -0,0 +1,27 @@ +# This workflow verifies that the changelod.d entries have been added +# for the changes in the pull request, using the GH CLI to check the changed files in the PR. + +name: CI Scriv entries. + +on: + pull_request: + +jobs: + ci-scriv-entries: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.head_ref }} + + - uses: actions/setup-python@v6 + with: + python-version: 3.13 + + - name: Check Scriv entries have been added. + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + gh pr view --json files --jq '.files[].path' \ + | grep -q "^changelog\.d/.*\.md$" || (echo "No changelog.d entries added or changed." && exit 1) diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 7812299..20856d1 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -1,3 +1,6 @@ +# This workflow creates a GitHub release based on the current version +# changed in the PR created by the create-release-pr workflow. + name: Create GitHub release. on: diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 1bb42ff..ff6b8d5 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -1,3 +1,7 @@ +# This workflow creates a pull request to bump the version and update the changelog +# according to the semantic versioning type provided as input. +# Once the PR is merged a new GH release should be created using the create-github-release workflow. + name: Create a release pull request. on: diff --git a/changelog.d/20260116_201552_daniel.quiroga_check_scriv_entries.md b/changelog.d/20260116_201552_daniel.quiroga_check_scriv_entries.md new file mode 100644 index 0000000..a8c5f0e --- /dev/null +++ b/changelog.d/20260116_201552_daniel.quiroga_check_scriv_entries.md @@ -0,0 +1,55 @@ + + + + +### Added + +- A new workflow has been added to verify Scriv is used when opening PRs. + + + + + + + +