Skip to content

Commit 331a543

Browse files
author
“thucydides”
committed
Add GitHub Actions workflow for automatic crates.io publishing
1 parent f9fd996 commit 331a543

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
name: Publish Crate
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Rust
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Publish rustorch-core
19+
run: cargo publish -p rustorch-core --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
20+
21+
- name: Publish rustorch-nn
22+
# Wait a bit for index update
23+
run: |
24+
sleep 30
25+
cargo publish -p rustorch-nn --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
26+
27+
- name: Publish rustorch-vision
28+
run: |
29+
sleep 10
30+
cargo publish -p rustorch-vision --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
32+
- name: Publish rustorch-text
33+
run: |
34+
sleep 10
35+
cargo publish -p rustorch-text --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
36+
37+
- name: Publish rustorch-wasm
38+
run: |
39+
sleep 10
40+
cargo publish -p rustorch-wasm --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)