split-paragraphs 1.0.0

Iterator over paragraphs of a string.
Documentation
name: release

on:
  push:
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'

concurrency:
  group: release
  cancel-in-progress: false

jobs:
  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    environment: release
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
        with:
          toolchain: "1.85"
      - name: Verify tag matches crate version
        run: |
          version="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')"
          test "$GITHUB_REF_NAME" = "$version"
      - run: cargo test --all-targets --no-default-features --locked
      - run: cargo publish --dry-run --locked
      - id: auth
        uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
      - run: cargo publish --locked
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

  github-release:
    name: Create GitHub release
    needs: publish
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --generate-notes --title "$GITHUB_REF_NAME"
        env:
          GH_TOKEN: ${{ github.token }}