From 10b579ec952504c70e6c16dde3f6a301908b4b6f Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 22 Mar 2025 00:19:54 +0000 Subject: [PATCH] tag_release workflow (#4) Reviewed-on: https://git.kundeng.us/phoenix/icarus-models/pulls/4 Co-authored-by: phoenix Co-committed-by: phoenix --- .gitea/workflows/tag_release.yaml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/tag_release.yaml diff --git a/.gitea/workflows/tag_release.yaml b/.gitea/workflows/tag_release.yaml new file mode 100644 index 0000000..15bf53f --- /dev/null +++ b/.gitea/workflows/tag_release.yaml @@ -0,0 +1,32 @@ + +name: Release Tagging + +on: + push: + branches: + - main + - dev + tags: + - 'v*' # Trigger on tags matching v* + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Important for git describe --tags + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: cargo + + - name: Extract Version from Cargo.toml + id: version + run: | + VERSION=$(grep '^version = "' Cargo.toml | sed -E 's/version = "([^"]+)"/\1/') + echo "::set-output name=version::$VERSION" + echo "tag: $TAG"