From dbc3ef63e8ba6477aa21c6aa199a2f043fd29534 Mon Sep 17 00:00:00 2001 From: Jamjamjon <51357717+jamjamjon@users.noreply.github.com> Date: Sun, 27 Apr 2025 14:25:32 +0800 Subject: [PATCH] Create rust-release.yml (#84) --- .github/workflows/rust-release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..58049f1 --- /dev/null +++ b/.github/workflows/rust-release.yml @@ -0,0 +1,25 @@ +name: Rust Release + +on: + push: + tags: + - v* + +jobs: + rust_publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo Registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ubuntu-latest-cargo-registry-${{ hashFiles('**/Cargo.toml') }} + + - name: Publish package rust + run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}