Skip to content

1.0.0-alpha.15

1.0.0-alpha.15 #11

Workflow file for this run

name: Publish
on:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
OPENAI_KEY: ${{ secrets.OPENAI_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 }}