forked from pelikhan/action-genai-video-issue-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.sh
More file actions
32 lines (24 loc) · 806 Bytes
/
release.sh
File metadata and controls
32 lines (24 loc) · 806 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
31
32
# make sure there's no other changes
git pull
# Lint and build
npm run lint
# Step 0: ensure we're in sync
if [ "$(git status --porcelain)" ]; then
echo "❌ Pending changes detected. Commit or stash them first."
exit 1
fi
# typecheck test
npm run typecheck
# Step 1: Bump patch version using npm
NEW_VERSION=$(npm version patch -m "chore: bump version to %s")
echo "version: $NEW_VERSION"
# Step 2: Push commit and tag
git push origin HEAD --tags
# Step 3: Create GitHub release
gh release create "$NEW_VERSION" --title "$NEW_VERSION" --notes "Patch release $NEW_VERSION"
# Step 4: update major tag if any
MAJOR=$(echo "$NEW_VERSION" | cut -d. -f1)
echo "major: $MAJOR"
git tag -f $MAJOR $NEW_VERSION
git push origin $MAJOR --force
echo "✅ GitHub release $NEW_VERSION created successfully."