name: Cargo Publish on: release: types: [ published ] env: # This env var is used by Swatinem/rust-cache@v2 for the cache # key, so we set it to make sure it is always consistent. CARGO_TERM_COLOR: always jobs: build: runs-on: ubuntu-22.04 timeout-minutes: 30 # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 with: workspaces: rust - name: Install dependencies run: | sudo apt update sudo apt install -y protobuf-compiler libssl-dev - name: Publish the package run: | cargo publish -p vectordb --all-features --token ${{ secrets.CARGO_REGISTRY_TOKEN }}