Skip to content

Commit 8cafbe6

Browse files
committed
Add release script for version bump and GitHub Actions integration
1 parent 7314f60 commit 8cafbe6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Prompt for the new version
4+
read -p "Enter new version (e.g. 1.1.0): " VERSION
5+
6+
# Validate version format: must be X.Y.Z
7+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
8+
echo "❌ Invalid version format. Use semantic versioning: X.Y.Z (e.g. 1.2.3)"
9+
exit 1
10+
fi
11+
12+
TAG="v$VERSION"
13+
14+
# Update version in readme.txt
15+
sed -i '' "s/^Stable tag: .*/Stable tag: $VERSION/" readme.txt
16+
17+
# Update version in main plugin file
18+
sed -i '' "s/^\(\*\s*Version:\s*\).*/\1$VERSION/" webhookarm.php
19+
20+
# Git add and commit
21+
git add readme.txt webhookarm.php
22+
git commit -m "🔖 Bump version to $VERSION"
23+
git push origin main
24+
25+
echo "✅ Version updated to $VERSION and pushed to main."
26+
echo "⏳ Waiting for GitHub Action to auto-tag version $TAG..."
27+
echo "👉 Monitor progress at: https://github.com/renatobo/WebHookARM/actions"

0 commit comments

Comments
 (0)