/ lsf / tag_release.sh
swadhinbiswas Feat:Moved to Rust · 2/15/2026
a330027
30 lines · 570 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# Check if a version argument is provided
if [ -z "$1" ]; then
    echo "Usage: $0 <version>"
    echo "Example: $0 1.0.0"
    exit 1
fi

VERSION=$1
TAG="v$VERSION"

# Confirm with the user
read -p "This will create and push tag $TAG. Proceed? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
    echo "Aborted."
    exit 1
fi

# Create the tag
echo "Creating tag $TAG..."
git tag -a "$TAG" -m "Release $TAG"

# Push the tag
echo "Pushing tag $TAG to origin..."
git push origin "$TAG"

echo "Done! This should trigger the Release workflow on GitHub."