tag_release workflow (#4)
All checks were successful
Release Tagging / release (push) Successful in 30s
All checks were successful
Release Tagging / release (push) Successful in 30s
Reviewed-on: phoenix/icarus-models#4 Co-authored-by: phoenix <kundeng94@gmail.com> Co-committed-by: phoenix <kundeng94@gmail.com>
This commit is contained in:
32
.gitea/workflows/tag_release.yaml
Normal file
32
.gitea/workflows/tag_release.yaml
Normal file
@@ -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"
|
Reference in New Issue
Block a user