Skip to content

Commit ec6c213

Browse files
authored
Merge pull request #2 from freddiev4/claude/explore-encoding-parallelism-9IHwU
Add crates.io publish metadata and GitHub Actions workflow
2 parents 41b9caa + cbc4740 commit ec6c213

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
publish:
10+
name: Publish
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Rust toolchain
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Cache cargo registry
19+
uses: actions/cache@v4
20+
with:
21+
path: |
22+
~/.cargo/registry
23+
~/.cargo/git
24+
target
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
26+
restore-keys: ${{ runner.os }}-cargo-
27+
28+
- name: Verify version matches tag
29+
run: |
30+
TAG="${GITHUB_REF_NAME#v}"
31+
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 \
32+
| jq -r '.packages[] | select(.name == "yts3") | .version')
33+
if [ "$TAG" != "$CRATE_VERSION" ]; then
34+
echo "Tag $TAG does not match Cargo.toml version $CRATE_VERSION"
35+
exit 1
36+
fi
37+
38+
- name: Publish
39+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.1.0"
44
edition = "2021"
55
description = "YouTube as S3 — encode arbitrary files into lossless video for cloud storage"
66
license = "MIT"
7+
repository = "https://github.com/freddiev4/yts3"
8+
keywords = ["video", "steganography", "ffmpeg", "encoding", "storage"]
9+
categories = ["command-line-utilities", "multimedia::video", "cryptography"]
710

811
[dependencies]
912
# CLI

0 commit comments

Comments
 (0)