anthropic-api 0.0.5

An unofficial Rust library for the Anthropic API.
Documentation
name: Publish
on:
  release:
    types: [created]
env:
  CARGO_TERM_COLOR: always
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
jobs:
  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
      - name: Format check
        run: cargo fmt --all -- --check
      - name: Build
        run: cargo build --verbose
      - name: Run tests (native-tls)
        run: cargo test --verbose
      - name: Run tests (rustls)
        run: cargo test --verbose --no-default-features --features=rustls
      - name: Publish
        run: cargo publish --token ${CRATES_TOKEN}
        env:
          CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}