@@ -18,4 +18,55 @@ run = [
1818
1919[tasks .ci ]
2020description = " Run all CI checks locally"
21- alias = " check"
21+ alias = " check"
22+
23+ [tasks .release ]
24+ description = " Create a new release with version tag (usage: mise run release -- v1.2.3)"
25+ depends = [" check" ]
26+ run = '''
27+ if [ -z "$1" ]; then
28+ echo 'Error: Please provide version (e.g., mise run release -- v1.2.3)'
29+ exit 1
30+ fi
31+
32+ VERSION="$1"
33+ MAJOR_VERSION=$(echo $VERSION | cut -d. -f1)
34+
35+ echo "=== Creating GitHub Action release ==="
36+ echo "Version: $VERSION (major: $MAJOR_VERSION)"
37+
38+ # Ensure we're on main branch and up to date
39+ git checkout main
40+ git pull origin main
41+
42+ # Create and push version tag
43+ echo "Creating tag: $VERSION"
44+ git tag -a "$VERSION" -m "Release $VERSION"
45+ git push origin "$VERSION"
46+
47+ # Update major version tag (e.g., v1)
48+ echo "Updating major version tag: $MAJOR_VERSION"
49+ git tag -f -a "$MAJOR_VERSION" -m "Release $MAJOR_VERSION (latest: $VERSION)"
50+ git push origin "$MAJOR_VERSION" --force
51+
52+ echo "=== Release completed! ==="
53+ echo "✅ Created version tag: $VERSION"
54+ echo "✅ Updated major tag: $MAJOR_VERSION"
55+ echo "📦 GitHub Marketplace will auto-update from the major version tag"
56+ echo "🔗 Create release notes at: https://github.com/cdviz-dev/send-cdevents/releases/new?tag=$VERSION"
57+ '''
58+
59+ [tasks .release-check ]
60+ description = " Check current release status and tags"
61+ depends = [" check" ]
62+ run = '''
63+ echo "=== Current Release Status ==="
64+ echo "Latest tags:"
65+ git tag --sort=-version:refname | head -5
66+
67+ echo "Current branch:"
68+ git branch --show-current
69+
70+ echo "Uncommitted changes:"
71+ git status --porcelain || echo "Working tree clean"
72+ '''
0 commit comments