From eea939b3fd6aa4f1c3e6f3d43f2a9bdc1f362830 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= <patrickelectric@gmail.com>
Date: Thu, 18 Jul 2024 10:33:37 -0300
Subject: [PATCH] Add new release flow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
---
 .github/workflows/deploy.yml | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 177e7ee..f274317 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -16,6 +16,18 @@ jobs:
         override: true
     - name: Build
       run: cargo build
-    - uses: katyo/publish-crates@v1
+    - name: Extract version from tag
+      id: get_version
+      run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
+    - name: Login to crates.io
+      uses: actions-rs/cargo@v1
       with:
-        registry-token: ${{ secrets.CARGO }}
+        command: login
+        args: ${{ secrets.CARGO }}
+    - name: Set and publish workspace crates
+      run: |
+        cargo install cargo-workspaces
+        cargo workspaces version custom ${{ steps.get_version.outputs.version }} \
+          --exact --yes --no-individual-tags \
+          -m "Commit new release ${{ steps.get_version.outputs.version }}"
+        cargo workspaces publish --yes --no-verify
-- 
GitLab