verctl 0.1.3

Stack-agnostic version PRs from Changesets-format fragments
Documentation
name: CI

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

env:
  GIT_CONFIG_COUNT: "1"
  GIT_CONFIG_KEY_0: init.defaultBranch
  GIT_CONFIG_VALUE_0: main
  CARGO_TERM_COLOR: always
  MISE_ENV: dev,ci

concurrency:
  group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}-${{ github.event.pull_request.base.sha || github.sha }}
  cancel-in-progress: true

jobs:
  # runs-on must be known before a job exists, so the machine cannot come
  # from a tool running inside that job. This reads [ci] and hands
  # the labels down, the same bootstrap the publish lane uses for assets.
  #
  # examples/workflows/ci.yml plans with the released tarball and needs no
  # compiler. This one cannot yet: the published binary has no `ci` verb, so
  # `mise run ver` builds it. It moves to MISE_ENV=release once a release
  # carries the verb; mise still installs the tarball then, but the nightly
  # toolchain and rust-cache below go away.
  plan:
    name: Plan
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.plan.outputs.matrix }}
    steps:
      - name: Check out repository
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - name: Set up mise
        uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
        with:
          version: 2026.8.2
          cache: true
      - run: mise install --locked
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          shared-key: verctl-plan
      - name: Plan validation jobs
        id: plan
        run: mise run ver -- ci --github-output "$GITHUB_OUTPUT"

  verify:
    name: ${{ matrix.name }}
    needs: plan
    strategy:
      fail-fast: false
      matrix: ${{ fromJson(needs.plan.outputs.matrix) }}
    runs-on: ${{ matrix.labels }}
    steps:
      - name: Check out repository
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
          fetch-depth: 0
      - name: Set up mise
        uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
        with:
          version: 2026.8.2
          cache: true
      - run: mise install --locked
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          shared-key: verctl-verify
      - name: Verify
        run: mise run verify