From 1c2418718952c6437d7b832a6cacd741a0760049 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Sat, 26 Apr 2025 19:39:06 -0300 Subject: [PATCH 1/2] 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 From 85ec3cd1d4778100cfa25d86d2661c73d3b0eb4e Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Sat, 26 Apr 2025 19:48:28 -0300 Subject: [PATCH 2/2] ci: update publish workflow --- .github/workflows/publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e58d57..5fa1764 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,10 @@ on: release: types: [published] +concurrency: + group: publish-crates + cancel-in-progress: true + jobs: publish: runs-on: ubuntu-latest