-
Notifications
You must be signed in to change notification settings - Fork 51
33 lines (28 loc) · 1.12 KB
/
publish-upon-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Publish to Crates.io
on:
release:
types:
- created
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
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
- name: Publish crates for llama-cpp-2
run: RUST_BACKTRACE=1 cargo publish --package llama-cpp-2 --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
# Trigger the 'update-toml-version' workflow
- name: Dispatch Update TOML Version Event
if: success() # Ensure this runs only if the previous steps were successful
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
"https://api.github.com/repos/${{ github.repository }}/dispatches" \
-d '{"event_type": "trigger-update-toml-version"}'