Publish to crates.io #1533
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish to crates.io" | |
on: | |
workflow_dispatch: {} | |
workflow_run: | |
workflows: ["Sync GGML"] | |
types: [completed] | |
jobs: | |
publish-crate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use latest release | |
run: | | |
git fetch --quiet --tags && \ | |
git checkout "$(git describe --tags `git rev-list --tags='v*' --max-count=1`)" && \ | |
( git submodule update --init && cd ggml-src && git checkout "$(cat ../ggml-tag-current.txt)" ) | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: katyo/publish-crates@v2 | |
with: | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
ignore-unpublished-changes: true |