From 163d3920c12a8940665a239a459f7d891e4a03e2 Mon Sep 17 00:00:00 2001 From: Benjamin Nguyen Date: Mon, 11 Nov 2024 18:19:31 -0800 Subject: [PATCH] rust(build): crates.io publish workflow + project metadata --- .github/workflows/rust_release.yaml | 24 +++++++++++++++++++++ .github/workflows/rust_release_dry_run.yaml | 1 + rust/Cargo.toml | 11 ++++++++++ rust/README.md | 1 + 4 files changed, 37 insertions(+) create mode 100644 .github/workflows/rust_release.yaml create mode 100644 rust/README.md diff --git a/.github/workflows/rust_release.yaml b/.github/workflows/rust_release.yaml new file mode 100644 index 00000000..d6fb42ca --- /dev/null +++ b/.github/workflows/rust_release.yaml @@ -0,0 +1,24 @@ +name: Crates Publish + +on: + workflow_dispatch: + +jobs: + rust-ci: + if: github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags') + uses: ./.github/workflows/rust_ci.yaml + + publish-to-crate-io-dry-run: + runs-on: ubuntu-latest + name: Publish to crates.io + needs: rust-ci + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + path: './rust' diff --git a/.github/workflows/rust_release_dry_run.yaml b/.github/workflows/rust_release_dry_run.yaml index 8f034e64..bc37ac35 100644 --- a/.github/workflows/rust_release_dry_run.yaml +++ b/.github/workflows/rust_release_dry_run.yaml @@ -2,6 +2,7 @@ name: Crates Publish (Dry Run) on: workflow_dispatch: + workflow_call: jobs: rust-ci: diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 0b7da000..068a22f2 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -2,6 +2,17 @@ name = "sift_rs" version = "0.1.0" edition = "2021" +authors = ["Sift Software Engineers "] +description = """ +Rust client library for the Sift API +""" +categories = ["aerospace", "science::robotics"] +homepage = "https://github.com/sift-stack/sift/tree/main/rust" +repository = "https://github.com/sift-stack/sift/tree/main/rust" +keywords = ["sift", "siftstack", "sift-stack", "sift_rs"] +exclude = ["examples/*"] +readme = "README.md" +license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust/README.md b/rust/README.md new file mode 100644 index 00000000..92742072 --- /dev/null +++ b/rust/README.md @@ -0,0 +1 @@ +# Sift Rust