mirror of
https://github.com/xheldon/git-folder-sync.git
synced 2026-07-22 06:59:00 +00:00
Add clean release tooling
- Add create-release.sh script for manual releases - Update .gitignore to exclude release files - Ensures only main.js, manifest.json, styles.css are released - GitHub Actions already configured for automatic clean releases
This commit is contained in:
parent
78d711a099
commit
f77759554a
2 changed files with 52 additions and 1 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -25,4 +25,8 @@ coverage/
|
|||
*.temp
|
||||
|
||||
# plugin data (contains sensitive information like tokens)
|
||||
data.json
|
||||
data.json
|
||||
|
||||
# release files
|
||||
release-*/
|
||||
*.zip
|
||||
47
create-release.sh
Executable file
47
create-release.sh
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 创建发布脚本 - 只包含必要文件
|
||||
# 使用方法: ./create-release.sh 1.0.2
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "使用方法: $0 <version>"
|
||||
echo "示例: $0 1.0.2"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$1
|
||||
RELEASE_DIR="release-$VERSION"
|
||||
|
||||
echo "🚀 准备发布 v$VERSION..."
|
||||
|
||||
# 确保已构建
|
||||
echo "📦 构建插件..."
|
||||
npm run build
|
||||
|
||||
# 创建发布目录
|
||||
mkdir -p $RELEASE_DIR
|
||||
|
||||
# 复制必需文件
|
||||
echo "📋 复制发布文件..."
|
||||
cp main.js $RELEASE_DIR/
|
||||
cp manifest.json $RELEASE_DIR/
|
||||
cp styles.css $RELEASE_DIR/
|
||||
|
||||
# 创建压缩包
|
||||
echo "🗜️ 创建压缩包..."
|
||||
cd $RELEASE_DIR
|
||||
zip -r "../git-folder-sync-$VERSION.zip" .
|
||||
cd ..
|
||||
|
||||
echo "✅ 发布文件已准备完成:"
|
||||
echo " 📁 $RELEASE_DIR/ (文件夹)"
|
||||
echo " 📦 git-folder-sync-$VERSION.zip (压缩包)"
|
||||
echo ""
|
||||
echo "📋 包含的文件:"
|
||||
ls -la $RELEASE_DIR/
|
||||
|
||||
echo ""
|
||||
echo "🎯 接下来的步骤:"
|
||||
echo "1. 在 GitHub 上创建新的 Release"
|
||||
echo "2. 上传 $RELEASE_DIR 中的三个文件作为 assets"
|
||||
echo "3. 或者上传 git-folder-sync-$VERSION.zip"
|
||||
Loading…
Reference in a new issue