-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpublish.sh
More file actions
executable file
·55 lines (44 loc) · 1.31 KB
/
publish.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.31 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Publish grazer-skill to NPM and PyPI
set -e
echo "🐄 GRAZER Publishing Script"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Check if on main/master branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "main" && "$BRANCH" != "master" ]]; then
echo "❌ Must be on main/master branch (currently on: $BRANCH)"
exit 1
fi
# Check for uncommitted changes
if [[ -n $(git status -s) ]]; then
echo "❌ Uncommitted changes detected. Commit first!"
exit 1
fi
echo ""
echo "📦 Building TypeScript..."
npm run build
echo ""
echo "🧪 Running tests..."
npm test || true
echo ""
echo "📤 Publishing to NPM..."
npm publish --access public
echo ""
echo "🐍 Building Python wheel..."
python3 setup.py sdist bdist_wheel
echo ""
echo "📤 Publishing to PyPI..."
python3 -m twine upload dist/*
echo ""
echo "🏷️ Creating Git tag..."
VERSION=$(node -p "require('./package.json').version")
git tag -a "v$VERSION" -m "Release v$VERSION"
git push origin "v$VERSION"
git push origin main
echo ""
echo "✅ Successfully published grazer v$VERSION!"
echo ""
echo "📊 Track downloads:"
echo " NPM: https://npmjs.com/package/@elyanlabs/grazer"
echo " PyPI: https://pypi.org/project/grazer-skill/"
echo " BoTTube: https://bottube.ai/skills/grazer"