From ac572d689ac89da97e25327040fe6a0fda03ada7 Mon Sep 17 00:00:00 2001 From: Babur Makhmudov Date: Tue, 24 Dec 2024 16:17:27 +0530 Subject: [PATCH] ci: add release workflow to publish the crate --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cb8ca23 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Publish to crates.io + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Rust + uses: actions/setup-rust@v1 + with: + rust-version: stable + + - name: Publish to Crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish