Skip to content

Commit 0f44da8

Browse files
committed
ci: add deployment
1 parent d2344c0 commit 0f44da8

File tree

4 files changed

+228
-929
lines changed

4 files changed

+228
-929
lines changed

.github/workflows/publish.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: dtolnay/rust-toolchain@stable
15+
16+
- name: Verify tag matches Cargo.toml version
17+
run: |
18+
CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
19+
TAG_VERSION=${GITHUB_REF#refs/tags/}
20+
if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
21+
echo "Tag $TAG_VERSION does not match Cargo.toml version $CARGO_VERSION"
22+
exit 1
23+
fi
24+
25+
- name: Run tests
26+
run: cargo test
27+
28+
- name: Publish rustmotion
29+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.toml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,33 @@
22
name = "rustmotion"
33
version = "0.1.0"
44
edition = "2021"
5-
description = "A CLI tool that renders motion design videos from JSON scenarios"
5+
description = "A CLI tool that renders motion design videos from JSON scenarios. No browser, no Node.js — just a single Rust binary."
66
license = "MIT"
77
repository = "https://github.com/music-soul1-1/rustmotion"
88

99
[dependencies]
10-
# CLI
1110
clap = { version = "4", features = ["derive"] }
12-
13-
# JSON
1411
serde = { version = "1", features = ["derive"] }
1512
serde_json = "1"
16-
17-
# 2D Rendering
1813
skia-safe = "0.82"
19-
20-
# Video encoding
2114
openh264 = "0.6"
22-
23-
# MP4 muxing
2415
minimp4 = { version = "0.1", features = ["aac"] }
25-
26-
# Audio decoding
2716
symphonia = { version = "0.5", features = ["mp3", "wav", "ogg", "flac", "aac"] }
28-
29-
# JSON Schema generation
3017
schemars = "0.8"
31-
32-
# TUI
3318
ratatui = "0.29"
3419
crossterm = "0.28"
35-
36-
# Image encoding (for single-frame PNG export)
3720
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
38-
39-
# Parallelism
4021
rayon = "1"
41-
42-
# Error handling
4322
anyhow = "1"
4423
thiserror = "2"
45-
46-
# SVG rendering
4724
resvg = "0.44"
4825
usvg = "0.44"
4926
tiny-skia = "0.11"
50-
51-
# GIF decoding/encoding
5227
gif = "0.13"
53-
54-
# Syntax highlighting
5528
syntect = { version = "5", default-features = false, features = ["default-fancy"] }
56-
57-
# Text diffing
5829
similar = "2"
59-
60-
# Concurrent hash map for asset caching
6130
dashmap = "6"
62-
63-
# Audio resampling (sinc)
6431
rubato = "0.16"
65-
66-
# File watching
6732
notify = "7"
68-
69-
# HTTP client (blocking, for Iconify API)
7033
ureq = "3"
71-
72-
# QR code generation
7334
qrcode = "0.14"

0 commit comments

Comments
 (0)