From 1c2418718952c6437d7b832a6cacd741a0760049 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Sat, 26 Apr 2025 19:39:06 -0300 Subject: [PATCH] ci: publish workflow --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4e58d57 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish to Crates.io + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install cargo-workspaces + run: cargo install cargo-workspaces + + - name: Publish to Crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo workspaces publish --no-git-commit --publish-as-is --token $CARGO_REGISTRY_TOKEN