Files
icarus_models/.gitea/workflows/tag_release.yaml
phoenix 547d6b0b74
All checks were successful
Release Tagging / release (push) Successful in 29s
Updated tag release workflow
2025-03-21 20:28:59 -04:00

37 lines
910 B
YAML

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/')
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
BRANCH_REF="${GITHUB_REF}"
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
echo "Version: $VERSION"
echo "Hash: $PROJECT_COMMIT_HASH"
echo "Branch: $BRANCH_NAME"