errand-bot 0.2.0

Run a coding agent from a chat channel, in a sandbox it cannot escape.
name: release

on:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  # Opens or updates the release pull request: the version bump and the
  # changelog, for a person to merge when the release is wanted.
  release-pr:
    name: release pull request
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    concurrency:
      group: release-plz-${{ github.ref }}
      cancel-in-progress: false
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          fetch-depth: 0
          token: ${{ secrets.RELEASE_PLZ_TOKEN }}

      - name: Install the Rust toolchain
        run: rustup show active-toolchain || rustup toolchain install

      - name: Open the release pull request
        uses: release-plz/action@d6c56271d640b6c1b61d1e00593641c400a9f4bd # v0.5.138
        with:
          command: release-pr
        env:
          GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

  # Publishes whatever the merged release pull request left on main, and tags
  # it. The interface is built first: the binary carries it, and a release
  # without one would serve nothing.
  release:
    name: publish
    runs-on: ubuntu-latest
    permissions:
      contents: write
      # Trusted publishing: the registry token is minted from this job's own
      # identity and lasts minutes, so nothing long-lived is stored here.
      id-token: write
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          fetch-depth: 0

      - name: Install the Rust toolchain
        run: rustup show active-toolchain || rustup toolchain install

      - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
        with:
          bun-version: latest

      - name: Build the interface
        run: cd web && bun install && bun run build

      - name: Mint a registry token for this run
        uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
        id: auth

      - name: Publish and tag
        uses: release-plz/action@d6c56271d640b6c1b61d1e00593641c400a9f4bd # v0.5.138
        with:
          command: release
        env:
          GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}