Files
luxe/.github/workflows/version.yml
Evan Whittaker 3042a3d3bd CI always starts and reports one CI passed check a ruleset can require; a prose-only change skips the jobs inside the run instead of skipping the run
A path filter on the trigger meant a docs-only pull request never got the checks a ruleset would require, so it could never merge. scripts/ci-changes.py decides from the diff whether the jobs have work, and CI passed sums them up, since a skipped matrix job reports under no name a ruleset can hold. The old filter also skipped crates/luxe-cli/guide.md, which the CLI compiles in, and docs/guide/, which the suite checks against the code; both now run the jobs.
2026-10-17 12:50:10 -05:00

39 lines
1.2 KiB
YAML

# Version — a pull request that changes what ships bumps the version by one semver step.
#
# Its own workflow, with no path filter, so it can be a required check beside `CI passed`: a
# required check that never starts blocks the merge forever. Whether a bump is owed is the script's
# call, from the diff. See scripts/version-check.py for the rules.
name: Version
on:
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: version-${{ github.ref }}
cancel-in-progress: true
jobs:
version:
name: version bump
# The development repository batches its work into the public one, where each merge is a release
if: github.repository == 'evanwhittaker/luxe'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# Full history: the diff is taken from the merge base with the target branch
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: The check's own tests
run: python3 scripts/version_check_test.py
- name: Version against the target branch
run: python3 scripts/version-check.py "origin/$BASE_REF"
env:
BASE_REF: ${{ github.base_ref }}