Skip to content

Publish to Crates.io #43

Publish to Crates.io

Publish to Crates.io #43

name: Publish to Crates.io
on:
release:
types:
- created
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Publish crates for llama-cpp-sys-2
run: RUST_BACKTRACE=1 cargo publish --package llama-cpp-sys-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose --dry-run
# - name: Publish crates for llama-cpp-2
# run: RUST_BACKTRACE=1 cargo publish --package llama-cpp-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose --dry-run
- name: Trigger Update version in TOML files Workflow
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.YOUR_PERSONAL_ACCESS_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/dispatches" \
-d '{"event_type": "trigger-update-toml-version"}'