From 706d70a42f71a8910271e90ea0f0557691c943b8 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 12 Dec 2022 14:59:19 +0100 Subject: [PATCH] Release rust. (#126) --- .github/workflows/rust-release.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/rust-release.yml diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml new file mode 100644 index 0000000..e946597 --- /dev/null +++ b/.github/workflows/rust-release.yml @@ -0,0 +1,32 @@ +name: Rust Release + +env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} + +on: + push: + tags: + - v* + +jobs: + rust_publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Cache Cargo Registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ubuntu-latest-cargo-registry-${{ hashFiles('**/Cargo.toml') }} + + - name: Publish package rust + working-directory: ./safetensors + run: cargo publish --token ${CRATES_TOKEN} + -- 2.43.0