2025-03-30 03:08:07 +00:00
|
|
|
name: Release Tagging
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
2025-10-12 20:15:11 +00:00
|
|
|
- main
|
2025-10-22 02:26:18 +00:00
|
|
|
pull_request:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
2025-03-30 03:08:07 +00:00
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
release:
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout code
|
2026-07-07 16:55:44 -04:00
|
|
|
uses: actions/checkout@v6
|
2025-03-30 03:08:07 +00:00
|
|
|
with:
|
|
|
|
|
fetch-depth: 0 # Important for git describe --tags
|
|
|
|
|
|
|
|
|
|
- name: Install Rust
|
2026-07-07 16:55:44 -04:00
|
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
2025-03-30 03:08:07 +00:00
|
|
|
with:
|
2026-07-14 17:09:14 -04:00
|
|
|
toolchain: 1.97
|
2025-03-30 03:08:07 +00:00
|
|
|
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)
|
|
|
|
|
PROJECT_TAG_RELEASE="v$VERSION-$BRANCH_NAME-$PROJECT_COMMIT_HASH"
|
2026-03-22 19:51:01 -04:00
|
|
|
|
2025-03-30 03:08:07 +00:00
|
|
|
echo "::set-output name=project_tag_release::$PROJECT_TAG_RELEASE-680"
|
|
|
|
|
echo "Version: $VERSION"
|
|
|
|
|
echo "Hash: $PROJECT_COMMIT_HASH"
|
|
|
|
|
echo "Branch: $BRANCH_NAME"
|
|
|
|
|
echo "Tag Release: $PROJECT_TAG_RELEASE"
|
|
|
|
|
|
|
|
|
|
- name: Print version
|
|
|
|
|
id: Version
|
|
|
|
|
run: |
|
|
|
|
|
echo "Printing version"
|
|
|
|
|
echo "Version: ${{ steps.version.outputs.project_tag_release }}"
|
|
|
|
|
|
|
|
|
|
- name: Create GitHub Release
|
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
|
env:
|
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
with:
|
|
|
|
|
tag_name: ${{ steps.version.outputs.project_tag_release }}
|
|
|
|
|
release_name: Release ${{ steps.version.outputs.project_tag_release }}
|
|
|
|
|
body: |
|
|
|
|
|
Release of version ${{ steps.version.outputs.project_tag_release }}
|