rabbitmq_http_client 0.88.0

RabbitMQ HTTP API client
Documentation
# SPDX-License-Identifier: MIT OR Apache-2.0

name: Release

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

permissions:
  contents: write
  id-token: write

env:
  CARGO_TERM_COLOR: always

jobs:
  validate:
    name: Validate
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6

      - uses: michaelklishin/rust-build-package-release-action@v2
        with:
          command: validate-changelog

      - uses: michaelklishin/rust-build-package-release-action@v2
        with:
          command: validate-version
          validate-cargo-toml: 'true'

  publish:
    name: Publish to crates.io
    needs: [validate]
    runs-on: ubuntu-24.04
    environment: release
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v6

      - uses: dtolnay/rust-toolchain@stable

      - name: Authenticate with crates.io
        id: auth
        uses: rust-lang/crates-io-auth-action@v1

      - uses: michaelklishin/rust-build-package-release-action@v2
        with:
          command: publish-crate
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

  github-release:
    name: Create GitHub Release
    needs: [validate]
    runs-on: ubuntu-24.04
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v6

      - uses: michaelklishin/rust-build-package-release-action@v2
        id: changelog
        with:
          command: extract-changelog

      - name: Publish GitHub release
        uses: softprops/action-gh-release@v2
        with:
          draft: false
          body_path: release_notes.md
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}