millionsend 0.4.0

Official Rust SDK for MillionSend — a self-hostable, Resend-compatible email API.
Documentation
name: release

# Publishes to crates.io via Trusted Publishing: configure crates.io → crate
# millionsend → Settings → Trusted Publishing → add GitHub
# (MillionSend/millionsend-rust, workflow release.yml). No token stored.
on:
  workflow_dispatch:
  push:
    tags: ["v*"]

permissions:
  contents: read

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write # OIDC for crates.io Trusted Publishing
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      # A tag publishes exactly the version the manifest declares; a tag that
      # disagrees with it is refused instead of shipping the wrong number.
      - name: Tag must match the manifest version
        if: github.ref_type == 'tag'
        run: test "v$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)" = "$GITHUB_REF_NAME"
      - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
      - run: cargo test
      - uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1
        id: auth
      - run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}