enprot 0.5.0

Engyon Protected Text (EPT) — confidentiality processor and capability ledger
name: Release

permissions:
  pull-requests: write
  contents: write

on:
  push:
    branches:
      - main

jobs:
  release-plz:
    name: Release-plz
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7
        with:
          fetch-depth: 0

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      # release-plz runs `cargo publish` which compiles enprot. enprot
      # transitively requires botan-sys (pkg-config botan-3) and rnp-rs
      # (<rnp/rnp.h>). ci/install.sh builds both from source so the
      # release job has matching versions regardless of distro lag.
      - name: Install system build deps
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            cmake libjson-c-dev zlib1g-dev libbz2-dev \
            git make g++ python3 jq unzip
      - name: Install Botan + librnp
        run: |
          ./ci/install.sh
          # ci/install.sh clones botan/ and tmp dirs into the working
          # tree, which `cargo publish` then refuses to package (3k+
          # untracked files). Clean up after the install — the system
          # install is what we need, not the source.
          rm -rf botan/ tmp.*/ 2>/dev/null || true
          git status --porcelain | head -5 || true
        env:
          BOTAN_VERSION: "3.7.0"
          PREFIX: /usr

      - name: Run release-plz
        uses: MarcoIeni/release-plz-action@v0.5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}